Skip to content

Commit

Permalink
Add tests for linux/if.h for additional IFF_ flags
Browse files Browse the repository at this point in the history
Also remove unneeded platform gating
  • Loading branch information
NoraCodes committed Sep 12, 2017
1 parent cf59069 commit 121795e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 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 {
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,8 @@ fn main() {
} else {
cfg.header("linux/fcntl.h");
}
cfg.header("net/if.h");
cfg.header("linux/if.h");
cfg.header("linux/quota.h");
cfg.skip_const(move |name| {
match name {
Expand Down
3 changes: 0 additions & 3 deletions src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,11 +621,8 @@ pub const F_TEST: ::c_int = 3;
pub const F_TLOCK: ::c_int = 2;
pub const F_ULOCK: ::c_int = 0;

#[cfg(any(target_arch="x86_64", target_arch="x86"))]
pub const IFF_LOWER_UP: ::c_int = 0x10000;
#[cfg(any(target_arch="x86_64", target_arch="x86"))]
pub const IFF_DORMANT: ::c_int = 0x20000;
#[cfg(any(target_arch="x86_64", target_arch="x86"))]
pub const IFF_ECHO: ::c_int = 0x40000;

pub const ST_RDONLY: ::c_ulong = 1;
Expand Down

0 comments on commit 121795e

Please sign in to comment.