Skip to content

Add sockaddr_ctl on Mac #898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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