Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does sctp_recvmsg return int instead of ssize_t? #48

Open
jefftt opened this issue Nov 4, 2022 · 3 comments
Open

Why does sctp_recvmsg return int instead of ssize_t? #48

jefftt opened this issue Nov 4, 2022 · 3 comments

Comments

@jefftt
Copy link

jefftt commented Nov 4, 2022

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

@marceloleitner
Copy link
Contributor

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.

@jefftt
Copy link
Author

jefftt commented Dec 2, 2022

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?

@marceloleitner
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants