summaryrefslogtreecommitdiff
path: root/src/unix/bsd/apple
diff options
context:
space:
mode:
authorluozijun <gnulinux@126.com>2017-12-26 15:57:11 +0800
committerluozijun <gnulinux@126.com>2017-12-27 04:03:39 +0800
commit629908abe33f4594a04dd4b4091e6eaca4056302 (patch)
tree79c4911b0a77f9dd3232933b31ef30ba578ea6ea /src/unix/bsd/apple
parent5221616a7714428df82b38605a786bb9988b4391 (diff)
downloadrust-libc-629908abe33f4594a04dd4b4091e6eaca4056302.tar.gz
Add struct `bpf_hdr` on macOS
Diffstat (limited to 'src/unix/bsd/apple')
-rw-r--r--src/unix/bsd/apple/b32.rs7
-rw-r--r--src/unix/bsd/apple/b64.rs7
2 files changed, 14 insertions, 0 deletions
diff --git a/src/unix/bsd/apple/b32.rs b/src/unix/bsd/apple/b32.rs
index 53fc0ae19d..5dea472ccb 100644
--- a/src/unix/bsd/apple/b32.rs
+++ b/src/unix/bsd/apple/b32.rs
@@ -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;
diff --git a/src/unix/bsd/apple/b64.rs b/src/unix/bsd/apple/b64.rs
index e4a3981941..2b34f85345 100644
--- a/src/unix/bsd/apple/b64.rs
+++ b/src/unix/bsd/apple/b64.rs
@@ -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;