lksctp-tools
lksctp-tools copied to clipboard
Why does sctp_recvmsg return int instead of ssize_t?
Hello, I was wondering why sctp_recvmsg
returns int
here instead of ssize_t
which is defined in the spec here.
In my case ssize_t
is 64 bits and int
is 32 bits so an int
with a value of -1 will be 4294967295 in 64 bits
I have no idea. It pre-dates git history. I would guess it was an overlook.
But agree, a classic type of bug that this needs fixing here. The standard recvmsg
also returns ssize_it.
What's the contributing process? I'd be happy to submit a patch, the only question I have is how will the API change be handled. Would this be considered a breaking change?
Cool. We're transitioning from patch over emails to using pull requests here. For now you can pick one and we will adjust.
On the API change, that's a good question. It's been so long.. I'm afraid we will have to figure it out. API wise, I think this is okay. Both are signed and no sctp msg can ever use that much. But ABI wise, I need to check.