-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add additional interface flags (IFF_) #761
Conversation
Looks like CI is failing? |
OK. At this point I don't understand why the build is failing, some help would be appreciated. |
it is failing because the C part (of the test) doesn't found the it could be just a missing C header in the test program. If so, you need to update The test will use them to check the accuracy of the Rust definition. |
Thanks @semarie. Upon adding
How can I resolve this? |
it is a C (and Linux) problem. Headers had to be included in the right order. As I don't use Linux, I couldn't tell. |
Add that header to the bottom of build.rs. I added a separate test binary for dealing with things like this which is specified towards the bottom of the file. So set the main test binary to ignore these constants and then only test them in the second binary. Because the second binary doesn't have so many headers you likely won't have a problem. You can see this is done for other constants and can follow a similar pattern. |
@Susurrus Thank you! I'll do that tomorrow. Much appreciated. |
Also remove unneeded platform gating
96212be
to
121795e
Compare
Progress! It's still failing, but only on |
4d0b775
to
6f170ef
Compare
All green! |
@bors: r+ Thanks! |
📌 Commit 6f170ef has been approved by |
Add additional interface flags (IFF_) Adds the three missing IFF_ constants (IFF_LOWER_UP, IFF_DORMANT, and IFF_ECHO) per nix-rust/nix#764
☀️ Test successful - status-appveyor, status-travis |
@@ -662,6 +665,10 @@ fn main() { | |||
} else { | |||
cfg.header("linux/fcntl.h"); | |||
} | |||
if !musl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not have been necessary because these constants aren't tested in this binary. Only your changes to the "main" test binary should have been necessary. Did you try this PR without this change first and only added it once you saw tests failing?
Adds the three missing IFF_ constants (IFF_LOWER_UP, IFF_DORMANT, and IFF_ECHO) per nix-rust/nix#764