Skip to content

Commit 37ced8b

Browse files
author
Bryant Mairs
committed
Add sockaddr_ctl on Mac
1 parent 3ccb075 commit 37ced8b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

libc-test/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ fn main() {
177177
cfg.header("net/route.h");
178178
cfg.header("netinet/if_ether.h");
179179
cfg.header("sys/proc_info.h");
180+
cfg.header("kern_control.h");
180181
}
181182

182183
if bsdlike {
@@ -216,7 +217,7 @@ fn main() {
216217
cfg.header("sys/reg.h");
217218
}
218219
}
219-
220+
220221
if linux || android || emscripten {
221222
cfg.header("malloc.h");
222223
cfg.header("net/ethernet.h");

src/unix/bsd/apple/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,15 @@ s! {
498498
pub sin_tos: ::c_ushort,
499499
pub sin_other: ::c_ushort,
500500
}
501+
502+
pub struct sockaddr_ctl {
503+
pub sc_len: ::c_uchar,
504+
pub sc_family: ::c_uchar,
505+
pub ss_sysaddr: ::uint16_t,
506+
pub sc_id: ::uint32_t,
507+
pub sc_unit: ::uint32_t,
508+
pub sc_reserved: [::uint32_t; 5],
509+
}
501510
}
502511

503512
pub const _UTX_USERSIZE: usize = 256;

0 commit comments

Comments
 (0)