diff options
author | SilverWingedSeraph <lfstindall@gmail.com> | 2017-09-12 09:09:13 -0500 |
---|---|---|
committer | SilverWingedSeraph <lfstindall@gmail.com> | 2017-09-12 09:15:45 -0500 |
commit | 121795e34cc8c99b977ba864c3603526ee58ffc8 (patch) | |
tree | 95af91bf0b17b6d808bbb425ba7bb9936ead6f93 | |
parent | cf590691fbe5e599b646636902a6d243f4cf2be4 (diff) | |
download | rust-libc-121795e34cc8c99b977ba864c3603526ee58ffc8.tar.gz |
Add tests for linux/if.h for additional IFF_ flags
Also remove unneeded platform gating
-rw-r--r-- | libc-test/build.rs | 5 | ||||
-rw-r--r-- | src/unix/notbsd/linux/mod.rs | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index 48077384de..a72039f923 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -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"); @@ -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 { diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index 6edb0a9fee..057be2e49d 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -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; |