Skip to content

Add additional interface flags (IFF_) #761

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

Merged
merged 5 commits into from
Sep 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ fn main() {
cfg.header("sys/mman.h");
cfg.header("sys/resource.h");
cfg.header("sys/socket.h");
if linux && !musl {
cfg.header("linux/if.h");
}
cfg.header("sys/time.h");
cfg.header("sys/un.h");
cfg.header("sys/wait.h");
Expand Down Expand Up @@ -662,6 +665,10 @@ fn main() {
} else {
cfg.header("linux/fcntl.h");
}
if !musl {
Copy link
Contributor

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?

cfg.header("net/if.h");
cfg.header("linux/if.h");
}
cfg.header("linux/quota.h");
cfg.skip_const(move |name| {
match name {
Expand Down
4 changes: 4 additions & 0 deletions src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,10 @@ pub const F_TEST: ::c_int = 3;
pub const F_TLOCK: ::c_int = 2;
pub const F_ULOCK: ::c_int = 0;

pub const IFF_LOWER_UP: ::c_int = 0x10000;
pub const IFF_DORMANT: ::c_int = 0x20000;
pub const IFF_ECHO: ::c_int = 0x40000;

pub const ST_RDONLY: ::c_ulong = 1;
pub const ST_NOSUID: ::c_ulong = 2;
pub const ST_NODEV: ::c_ulong = 4;
Expand Down