diff options
-rw-r--r-- | libc-test/build.rs | 6 | ||||
-rw-r--r-- | src/unix/bsd/netbsdlike/mod.rs | 13 | ||||
-rw-r--r-- | src/unix/bsd/netbsdlike/netbsd/mod.rs | 14 | ||||
-rw-r--r-- | src/unix/bsd/netbsdlike/openbsdlike/mod.rs | 12 | ||||
-rw-r--r-- | src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs | 2 |
5 files changed, 26 insertions, 21 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index 29e43f6d14..795330ab3f 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -538,12 +538,6 @@ fn main() { "KERN_USERMOUNT" | "KERN_ARND" if openbsd => true, - // These constants were added in OpenBSD 6.2 - "EV_RECEIPT" | "EV_DISPATCH" if openbsd => true, - - // These constants were added in OpenBSD 6.3 - "MAP_STACK" if openbsd => true, - // These are either unimplemented or optionally built into uClibc "LC_CTYPE_MASK" | "LC_NUMERIC_MASK" | "LC_TIME_MASK" | "LC_COLLATE_MASK" | "LC_MONETARY_MASK" | "LC_MESSAGES_MASK" | "MADV_MERGEABLE" | "MADV_UNMERGEABLE" | "MADV_HWPOISON" | "IPV6_ADD_MEMBERSHIP" | "IPV6_DROP_MEMBERSHIP" | "IPV6_MULTICAST_LOOP" | "IPV6_V6ONLY" | diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index 1b7576e768..6384a29f8c 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -57,15 +57,6 @@ s! { pub l_type: ::c_short, pub l_whence: ::c_short, } - - #[repr(packed)] - pub struct arphdr { - pub ar_hrd: u16, - pub ar_pro: u16, - pub ar_hln: u8, - pub ar_pln: u8, - pub ar_op: u16, - } } pub const D_T_FMT: ::nl_item = 0; @@ -430,10 +421,6 @@ pub const IPV6_RECVPKTINFO: ::c_int = 36; pub const IPV6_PKTINFO: ::c_int = 46; pub const TCP_NODELAY: ::c_int = 0x01; -pub const TCP_KEEPIDLE: ::c_int = 3; -pub const TCP_KEEPINTVL: ::c_int = 5; -pub const TCP_KEEPCNT: ::c_int = 6; -pub const TCP_KEEPINIT: ::c_int = 7; pub const SOL_SOCKET: ::c_int = 0xffff; pub const SO_DEBUG: ::c_int = 0x01; diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index 01dd188495..065f6bd36a 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -318,6 +318,15 @@ s! { pub ipi_addr: ::in_addr, pub ipi_ifindex: ::c_uint, } + + #[repr(packed)] + pub struct arphdr { + pub ar_hrd: u16, + pub ar_pro: u16, + pub ar_hln: u8, + pub ar_pln: u8, + pub ar_op: u16, + } } pub const AT_FDCWD: ::c_int = -100; @@ -381,6 +390,11 @@ pub const IP_RECVPKTINFO: ::c_int = 26; pub const IPV6_JOIN_GROUP: ::c_int = 12; pub const IPV6_LEAVE_GROUP: ::c_int = 13; +pub const TCP_KEEPIDLE: ::c_int = 3; +pub const TCP_KEEPINTVL: ::c_int = 5; +pub const TCP_KEEPCNT: ::c_int = 6; +pub const TCP_KEEPINIT: ::c_int = 7; + pub const SOCK_CONN_DGRAM: ::c_int = 6; pub const SOCK_DCCP: ::c_int = SOCK_CONN_DGRAM; pub const SOCK_NOSIGPIPE: ::c_int = 0x40000000; diff --git a/src/unix/bsd/netbsdlike/openbsdlike/mod.rs b/src/unix/bsd/netbsdlike/openbsdlike/mod.rs index e44bfca61c..bf5ddd2e7a 100644 --- a/src/unix/bsd/netbsdlike/openbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsdlike/mod.rs @@ -193,6 +193,14 @@ s! { pub gid: ::gid_t, pub pid: ::pid_t, } + + pub struct arphdr { + pub ar_hrd: u16, + pub ar_pro: u16, + pub ar_hln: u8, + pub ar_pln: u8, + pub ar_op: u16, + } } pub const UT_NAMESIZE: usize = 32; @@ -579,6 +587,7 @@ pub const CTL_MACHDEP: ::c_int = 7; pub const CTL_DDB: ::c_int = 9; pub const CTL_VFS: ::c_int = 10; pub const CTL_MAXID: ::c_int = 11; +pub const HW_NCPUONLINE: ::c_int = 25; pub const KERN_OSTYPE: ::c_int = 1; pub const KERN_OSRELEASE: ::c_int = 2; pub const KERN_OSREV: ::c_int = 3; @@ -653,7 +662,8 @@ pub const KERN_PROC_VMMAP: ::c_int = 80; pub const KERN_GLOBAL_PTRACE: ::c_int = 81; pub const KERN_CONSBUFSIZE: ::c_int = 82; pub const KERN_CONSBUF: ::c_int = 83; -pub const KERN_MAXID: ::c_int = 84; +pub const KERN_AUDIO: ::c_int = 84; +pub const KERN_MAXID: ::c_int = 85; pub const KERN_PROC_ALL: ::c_int = 0; pub const KERN_PROC_PID: ::c_int = 1; pub const KERN_PROC_PGRP: ::c_int = 2; diff --git a/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs index cca8a47ae0..a2d5ac07c2 100644 --- a/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs @@ -47,7 +47,7 @@ pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast -pub const SIGSTKSZ : ::size_t = 24576; +pub const SIGSTKSZ : ::size_t = 28672; extern { pub fn accept4(s: ::c_int, addr: *mut ::sockaddr, |