Skip to content

Commit d5236b0

Browse files
committed
Auto merge of #761 - LeoTindall:add_linux_iff_constants, r=alexcrichton
Add additional interface flags (IFF_) Adds the three missing IFF_ constants (IFF_LOWER_UP, IFF_DORMANT, and IFF_ECHO) per nix-rust/nix#764
2 parents 703ae4f + 6f170ef commit d5236b0

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

libc-test/build.rs

Lines changed: 7 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 && !musl {
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");
@@ -663,6 +666,10 @@ fn main() {
663666
} else {
664667
cfg.header("linux/fcntl.h");
665668
}
669+
if !musl {
670+
cfg.header("net/if.h");
671+
cfg.header("linux/if.h");
672+
}
666673
cfg.header("linux/quota.h");
667674
cfg.skip_const(move |name| {
668675
match name {

src/unix/notbsd/linux/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,10 @@ pub const F_TEST: ::c_int = 3;
626626
pub const F_TLOCK: ::c_int = 2;
627627
pub const F_ULOCK: ::c_int = 0;
628628

629+
pub const IFF_LOWER_UP: ::c_int = 0x10000;
630+
pub const IFF_DORMANT: ::c_int = 0x20000;
631+
pub const IFF_ECHO: ::c_int = 0x40000;
632+
629633
pub const ST_RDONLY: ::c_ulong = 1;
630634
pub const ST_NOSUID: ::c_ulong = 2;
631635
pub const ST_NODEV: ::c_ulong = 4;

0 commit comments

Comments
 (0)