Skip to content

Commit 121795e

Browse files
committed
Add tests for linux/if.h for additional IFF_ flags
Also remove unneeded platform gating
1 parent cf59069 commit 121795e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

libc-test/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ fn main() {
9191
cfg.header("sys/mman.h");
9292
cfg.header("sys/resource.h");
9393
cfg.header("sys/socket.h");
94+
if linux {
95+
cfg.header("linux/if.h");
96+
}
9497
cfg.header("sys/time.h");
9598
cfg.header("sys/un.h");
9699
cfg.header("sys/wait.h");
@@ -662,6 +665,8 @@ fn main() {
662665
} else {
663666
cfg.header("linux/fcntl.h");
664667
}
668+
cfg.header("net/if.h");
669+
cfg.header("linux/if.h");
665670
cfg.header("linux/quota.h");
666671
cfg.skip_const(move |name| {
667672
match name {

src/unix/notbsd/linux/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,8 @@ pub const F_TEST: ::c_int = 3;
621621
pub const F_TLOCK: ::c_int = 2;
622622
pub const F_ULOCK: ::c_int = 0;
623623

624-
#[cfg(any(target_arch="x86_64", target_arch="x86"))]
625624
pub const IFF_LOWER_UP: ::c_int = 0x10000;
626-
#[cfg(any(target_arch="x86_64", target_arch="x86"))]
627625
pub const IFF_DORMANT: ::c_int = 0x20000;
628-
#[cfg(any(target_arch="x86_64", target_arch="x86"))]
629626
pub const IFF_ECHO: ::c_int = 0x40000;
630627

631628
pub const ST_RDONLY: ::c_ulong = 1;

0 commit comments

Comments
 (0)