-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix CMSG_DATA(3) and friends on BSD #1212
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
I'm not 100% sure about the |
One question. The |
PR rust-lang#1098 added the CMSG_DATA(3) family of functions into libc. Because they're defined as macros in C, they had to be rewritten as Rust functions for libc. Also, they can't be tested in CI for the same reason. But that PR erroneously used the same definitions in BSD as in Linux. This commit corrects the definitions for OSX, FreeBSD, DragonflyBSD, OpenBSD, and NetBSD. I renamed a few variables and collapsed a few macros in order to combine the definitions where possible. Fixes rust-lang#1210
@bors: r+ Thanks! I think we covered the safety in another issue where we're hoping for consistency here, but we'll see how that pays off over time! |
📌 Commit 8067378 has been approved by |
Fix CMSG_DATA(3) and friends on BSD PR #1098 added the CMSG_DATA(3) family of functions into libc. Because they're defined as macros in C, they had to be rewritten as Rust functions for libc. Also, they can't be tested in CI for the same reason. But that PR erroneously used the same definitions in BSD as in Linux. This commit corrects the definitions for OSX, FreeBSD, DragonflyBSD, OpenBSD, and NetBSD. I renamed a few variables and collapsed a few macros in order to combine the definitions where possible. Fixes #1210
☀️ Test successful - checks-cirrus, checks-travis, status-appveyor |
This was an oversight from PR rust-lang#1212. It's been revealed by the new cmsg test.
PR #1098 added the CMSG_DATA(3) family of functions into libc. Because
they're defined as macros in C, they had to be rewritten as Rust
functions for libc. Also, they can't be tested in CI for the same
reason. But that PR erroneously used the same definitions in BSD as in
Linux.
This commit corrects the definitions for OSX, FreeBSD, DragonflyBSD,
OpenBSD, and NetBSD. I renamed a few variables and collapsed a few
macros in order to combine the definitions where possible.
Fixes #1210