Merge pull request #50 from polachok/netlink
sockaddr_nl for netlink sockets
This commit is contained in:
commit
83ac25aa21
@ -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" |
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user