Skip to content

Commit

Permalink
Auto merge of #898 - Susurrus:sockaddr_ctl, r=alexcrichton
Browse files Browse the repository at this point in the history
Add sockaddr_ctl on Mac
  • Loading branch information
bors committed Jan 15, 2018
2 parents 3ccb075 + 46933f0 commit 041fd77
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ fn main() {
cfg.header("net/route.h");
cfg.header("netinet/if_ether.h");
cfg.header("sys/proc_info.h");
cfg.header("sys/kern_control.h");
}

if bsdlike {
Expand Down Expand Up @@ -216,7 +217,7 @@ fn main() {
cfg.header("sys/reg.h");
}
}

if linux || android || emscripten {
cfg.header("malloc.h");
cfg.header("net/ethernet.h");
Expand Down
9 changes: 9 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,15 @@ s! {
pub sin_tos: ::c_ushort,
pub sin_other: ::c_ushort,
}

pub struct sockaddr_ctl {
pub sc_len: ::c_uchar,
pub sc_family: ::c_uchar,
pub ss_sysaddr: ::uint16_t,
pub sc_id: ::uint32_t,
pub sc_unit: ::uint32_t,
pub sc_reserved: [::uint32_t; 5],
}
}

pub const _UTX_USERSIZE: usize = 256;
Expand Down

0 comments on commit 041fd77

Please sign in to comment.