Add struct `bpf_hdr` on macOS
This commit is contained in:
parent
5221616a77
commit
629908abe3
|
@ -170,6 +170,7 @@ fn main() {
|
|||
cfg.header("sys/xattr.h");
|
||||
cfg.header("sys/sys_domain.h");
|
||||
cfg.header("net/if_utun.h");
|
||||
cfg.header("net/bpf.h");
|
||||
if target.starts_with("x86") {
|
||||
cfg.header("crt_externs.h");
|
||||
}
|
||||
|
|
|
@ -41,6 +41,13 @@ s! {
|
|||
pub ifi_reserved1: u32,
|
||||
pub ifi_reserved2: u32,
|
||||
}
|
||||
|
||||
pub struct bpf_hdr {
|
||||
pub bh_tstamp: ::timeval,
|
||||
pub bh_caplen: ::uint32_t,
|
||||
pub bh_datalen: ::uint32_t,
|
||||
pub bh_hdrlen: ::c_ushort,
|
||||
}
|
||||
}
|
||||
|
||||
pub const __PTHREAD_MUTEX_SIZE__: usize = 40;
|
||||
|
|
|
@ -46,6 +46,13 @@ s! {
|
|||
pub ifi_reserved1: u32,
|
||||
pub ifi_reserved2: u32,
|
||||
}
|
||||
|
||||
pub struct bpf_hdr {
|
||||
pub bh_tstamp: ::timeval32,
|
||||
pub bh_caplen: ::uint32_t,
|
||||
pub bh_datalen: ::uint32_t,
|
||||
pub bh_hdrlen: ::c_ushort,
|
||||
}
|
||||
}
|
||||
|
||||
pub const __PTHREAD_MUTEX_SIZE__: usize = 56;
|
||||
|
|
Loading…
Reference in New Issue