summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-11-27 21:15:10 +0000
committerbors <bors@rust-lang.org>2018-11-27 21:15:10 +0000
commitaf6e4fd2d258c23a33d78262784ff6f2248057f1 (patch)
treed3d2f81fe4092ef72d6c32719f5aa52e89ba2eb4
parent8bd330a70f3ed2c8fbf93e2d3d31edefcbc9183d (diff)
parenta1fb747270b7abdb42c4bb5898d0ae368854ac80 (diff)
downloadrust-libc-af6e4fd2d258c23a33d78262784ff6f2248057f1.tar.gz
Auto merge of #1155 - semarie:openbsd-unbreak, r=gnzlbg
Openbsd unbreak - unbreak openbsd after #1128 - unbreak openbsd after #1151 - while here, add `KERN_CPUSTATS` and increment `KERN_MAXID` for openbsd
-rw-r--r--src/unix/bsd/apple/mod.rs2
-rw-r--r--src/unix/bsd/freebsdlike/mod.rs2
-rw-r--r--src/unix/bsd/mod.rs2
-rw-r--r--src/unix/bsd/netbsdlike/mod.rs13
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/mod.rs7
-rw-r--r--src/unix/bsd/netbsdlike/openbsdlike/mod.rs8
6 files changed, 17 insertions, 17 deletions
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs
index a9ac3ba0e1..4680389e60 100644
--- a/src/unix/bsd/apple/mod.rs
+++ b/src/unix/bsd/apple/mod.rs
@@ -1549,6 +1549,8 @@ pub const IPV6_LEAVE_GROUP: ::c_int = 13;
pub const IPV6_PKTINFO: ::c_int = 46;
pub const IPV6_RECVPKTINFO: ::c_int = 61;
+pub const TCP_NOPUSH: ::c_int = 4;
+pub const TCP_NOOPT: ::c_int = 8;
pub const TCP_KEEPALIVE: ::c_int = 0x10;
pub const SOL_LOCAL: ::c_int = 0;
diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs
index 5948a71fc7..30228640d4 100644
--- a/src/unix/bsd/freebsdlike/mod.rs
+++ b/src/unix/bsd/freebsdlike/mod.rs
@@ -669,6 +669,8 @@ pub const IPV6_LEAVE_GROUP: ::c_int = 13;
pub const IPV6_RECVPKTINFO: ::c_int = 36;
pub const IPV6_PKTINFO: ::c_int = 46;
+pub const TCP_NOPUSH: ::c_int = 4;
+pub const TCP_NOOPT: ::c_int = 8;
pub const TCP_KEEPIDLE: ::c_int = 256;
pub const TCP_KEEPINTVL: ::c_int = 512;
pub const TCP_KEEPCNT: ::c_int = 1024;
diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs
index a7ac8d7874..770b9b9818 100644
--- a/src/unix/bsd/mod.rs
+++ b/src/unix/bsd/mod.rs
@@ -318,8 +318,6 @@ pub const LOG_PERROR: ::c_int = 0x20;
pub const TCP_NODELAY: ::c_int = 1;
pub const TCP_MAXSEG: ::c_int = 2;
-pub const TCP_NOPUSH: ::c_int = 4;
-pub const TCP_NOOPT: ::c_int = 8;
pub const PIPE_BUF: usize = 512;
diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs
index 3d8c05b1dd..468d3fdd25 100644
--- a/src/unix/bsd/netbsdlike/mod.rs
+++ b/src/unix/bsd/netbsdlike/mod.rs
@@ -431,14 +431,6 @@ pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
pub const IPV6_RECVPKTINFO: ::c_int = 36;
pub const IPV6_PKTINFO: ::c_int = 46;
-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 TCP_INFO: ::c_int = 9;
-pub const TCP_MD5SIG: ::c_int = 0x10;
-pub const TCP_CONGCTL: ::c_int = 0x20;
-
pub const SOL_SOCKET: ::c_int = 0xffff;
pub const SO_DEBUG: ::c_int = 0x01;
pub const SO_ACCEPTCONN: ::c_int = 0x0002;
@@ -611,11 +603,6 @@ f! {
}
}
-extern {
- pub fn chflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int;
- pub fn fchflags(fd: ::c_int, flags: ::c_ulong) -> ::c_int;
-}
-
#[link(name = "util")]
extern {
pub fn mincore(addr: *mut ::c_void, len: ::size_t,
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs
index 5fedee60b1..786b9c74e6 100644
--- a/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -399,9 +399,14 @@ 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_NOPUSH: ::c_int = 4;
pub const TCP_KEEPINTVL: ::c_int = 5;
pub const TCP_KEEPCNT: ::c_int = 6;
pub const TCP_KEEPINIT: ::c_int = 7;
+pub const TCP_NOOPT: ::c_int = 8;
+pub const TCP_INFO: ::c_int = 9;
+pub const TCP_MD5SIG: ::c_int = 0x10;
+pub const TCP_CONGCTL: ::c_int = 0x20;
pub const SOCK_CONN_DGRAM: ::c_int = 6;
pub const SOCK_DCCP: ::c_int = SOCK_CONN_DGRAM;
@@ -1032,6 +1037,8 @@ extern {
pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
+ pub fn chflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int;
+ pub fn fchflags(fd: ::c_int, flags: ::c_ulong) -> ::c_int;
pub fn lchflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int;
pub fn extattr_delete_fd(fd: ::c_int,
diff --git a/src/unix/bsd/netbsdlike/openbsdlike/mod.rs b/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
index 01e9cca237..85f0a02a12 100644
--- a/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
+++ b/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
@@ -321,6 +321,7 @@ pub const IP_RECVDSTADDR: ::c_int = 7;
pub const IP_SENDSRCADDR: ::c_int = IP_RECVDSTADDR;
// sys/netinet/in.h
+pub const TCP_MD5SIG: ::c_int = 0x04;
pub const TCP_NOPUSH: ::c_int = 0x10;
pub const AF_ECMA: ::c_int = 8;
@@ -667,7 +668,8 @@ 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_AUDIO: ::c_int = 84;
-pub const KERN_MAXID: ::c_int = 85;
+pub const KERN_CPUSTATS: ::c_int = 85;
+pub const KERN_MAXID: ::c_int = 86;
pub const KERN_PROC_ALL: ::c_int = 0;
pub const KERN_PROC_PID: ::c_int = 1;
pub const KERN_PROC_PGRP: ::c_int = 2;
@@ -710,7 +712,9 @@ f! {
}
extern {
- pub fn chflagsat(fd: ::c_int, path: *const ::c_char, flags: ::c_ulong,
+ pub fn chflags(path: *const ::c_char, flags: ::c_uint) -> ::c_int;
+ pub fn fchflags(fd: ::c_int, flags: ::c_uint) -> ::c_int;
+ pub fn chflagsat(fd: ::c_int, path: *const ::c_char, flags: ::c_uint,
atflag: ::c_int) -> ::c_int;
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
pub fn getnameinfo(sa: *const ::sockaddr,