Merge pull request #50 from polachok/netlink

sockaddr_nl for netlink sockets
This commit is contained in:
Alex Crichton 2015-11-11 11:07:02 -08:00
commit 83ac25aa21
2 changed files with 18 additions and 0 deletions

View File

@ -108,6 +108,10 @@ fn main() {
cfg.header("net/ethernet.h");
cfg.header("malloc.h");
cfg.header("sys/prctl.h");
/* linux kernel header */
if !musl {
cfg.header("linux/netlink.h");
}
}
if freebsd {
@ -177,6 +181,13 @@ fn main() {
}
});
cfg.skip_struct(move |ty| {
match ty {
"sockaddr_nl" => musl,
_ => false
}
});
cfg.skip_signededness(|c| {
match c {
"LARGE_INTEGER" |

View File

@ -118,6 +118,13 @@ s! {
pub f_namemax: ::c_ulong,
__f_spare: [::c_int; 6],
}
pub struct sockaddr_nl {
pub nl_family: ::sa_family_t,
nl_pad: ::c_ushort,
pub nl_pid: u32,
pub nl_groups: u32
}
}
pub const FILENAME_MAX: ::c_uint = 4096;