diff --git a/libc-test/build.rs b/libc-test/build.rs index e45bae667807a3aad4f3d93017871c9a1b1e7c60..a62c7c44469cf285d6980412e59442da8ed2cab0 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 && !musl { + cfg.header("linux/if.h"); + } cfg.header("sys/time.h"); cfg.header("sys/un.h"); cfg.header("sys/wait.h"); @@ -663,6 +666,10 @@ fn main() { } else { cfg.header("linux/fcntl.h"); } + if !musl { + 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 b4e1c3c009690f960c55e2040184752f18c6d2cd..fc69f3592cc4cd0be3121bd2dab6ff101c3e37c1 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -626,6 +626,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;