summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-07-16 00:25:22 +0000
committerbors <bors@rust-lang.org>2018-07-16 00:25:22 +0000
commit73c02637c4624eed576087b6c0aca91e3f94b383 (patch)
treead440ec54d82ec40c4b7192cfa0664407c9573b8
parentbfe0e32d1260d5dd317aa144e757c1edbcc08ea3 (diff)
parentfec9baf0a3752aecdbd372897d23c19368499b47 (diff)
downloadrust-libc-73c02637c4624eed576087b6c0aca91e3f94b383.tar.gz
Auto merge of #1040 - semarie:openbsd-fix, r=alexcrichton
Openbsd fix put in several fixes for OpenBSD (one fix per commit). testsuite ran on OpenBSD 6.3-current (upcoming 6.4) ``` RUNNING ALL TESTS PASSED 6474 tests ```
-rw-r--r--libc-test/build.rs6
-rw-r--r--src/unix/bsd/netbsdlike/mod.rs13
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/mod.rs14
-rw-r--r--src/unix/bsd/netbsdlike/openbsdlike/mod.rs12
-rw-r--r--src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs2
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,