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
This commit is contained in:
bors 2017-09-12 19:39:52 +00:00
commit d5236b0b91
2 changed files with 11 additions and 0 deletions

View File

@ -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 {

View File

@ -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;