Skip to content

Commit af6e4fd

Browse files
committed
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
2 parents 8bd330a + a1fb747 commit af6e4fd

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,6 +1549,8 @@ pub const IPV6_LEAVE_GROUP: ::c_int = 13;
15491549
pub const IPV6_PKTINFO: ::c_int = 46;
15501550
pub const IPV6_RECVPKTINFO: ::c_int = 61;
15511551

1552+
pub const TCP_NOPUSH: ::c_int = 4;
1553+
pub const TCP_NOOPT: ::c_int = 8;
15521554
pub const TCP_KEEPALIVE: ::c_int = 0x10;
15531555

15541556
pub const SOL_LOCAL: ::c_int = 0;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,8 @@ pub const IPV6_LEAVE_GROUP: ::c_int = 13;
669669
pub const IPV6_RECVPKTINFO: ::c_int = 36;
670670
pub const IPV6_PKTINFO: ::c_int = 46;
671671

672+
pub const TCP_NOPUSH: ::c_int = 4;
673+
pub const TCP_NOOPT: ::c_int = 8;
672674
pub const TCP_KEEPIDLE: ::c_int = 256;
673675
pub const TCP_KEEPINTVL: ::c_int = 512;
674676
pub const TCP_KEEPCNT: ::c_int = 1024;

src/unix/bsd/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,6 @@ pub const LOG_PERROR: ::c_int = 0x20;
318318

319319
pub const TCP_NODELAY: ::c_int = 1;
320320
pub const TCP_MAXSEG: ::c_int = 2;
321-
pub const TCP_NOPUSH: ::c_int = 4;
322-
pub const TCP_NOOPT: ::c_int = 8;
323321

324322
pub const PIPE_BUF: usize = 512;
325323

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -431,14 +431,6 @@ pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
431431
pub const IPV6_RECVPKTINFO: ::c_int = 36;
432432
pub const IPV6_PKTINFO: ::c_int = 46;
433433

434-
pub const TCP_KEEPIDLE: ::c_int = 3;
435-
pub const TCP_KEEPINTVL: ::c_int = 5;
436-
pub const TCP_KEEPCNT: ::c_int = 6;
437-
pub const TCP_KEEPINIT: ::c_int = 7;
438-
pub const TCP_INFO: ::c_int = 9;
439-
pub const TCP_MD5SIG: ::c_int = 0x10;
440-
pub const TCP_CONGCTL: ::c_int = 0x20;
441-
442434
pub const SOL_SOCKET: ::c_int = 0xffff;
443435
pub const SO_DEBUG: ::c_int = 0x01;
444436
pub const SO_ACCEPTCONN: ::c_int = 0x0002;
@@ -611,11 +603,6 @@ f! {
611603
}
612604
}
613605

614-
extern {
615-
pub fn chflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int;
616-
pub fn fchflags(fd: ::c_int, flags: ::c_ulong) -> ::c_int;
617-
}
618-
619606
#[link(name = "util")]
620607
extern {
621608
pub fn mincore(addr: *mut ::c_void, len: ::size_t,

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,14 @@ pub const IPV6_JOIN_GROUP: ::c_int = 12;
399399
pub const IPV6_LEAVE_GROUP: ::c_int = 13;
400400

401401
pub const TCP_KEEPIDLE: ::c_int = 3;
402+
pub const TCP_NOPUSH: ::c_int = 4;
402403
pub const TCP_KEEPINTVL: ::c_int = 5;
403404
pub const TCP_KEEPCNT: ::c_int = 6;
404405
pub const TCP_KEEPINIT: ::c_int = 7;
406+
pub const TCP_NOOPT: ::c_int = 8;
407+
pub const TCP_INFO: ::c_int = 9;
408+
pub const TCP_MD5SIG: ::c_int = 0x10;
409+
pub const TCP_CONGCTL: ::c_int = 0x20;
405410

406411
pub const SOCK_CONN_DGRAM: ::c_int = 6;
407412
pub const SOCK_DCCP: ::c_int = SOCK_CONN_DGRAM;
@@ -1032,6 +1037,8 @@ extern {
10321037
pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
10331038
nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
10341039

1040+
pub fn chflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int;
1041+
pub fn fchflags(fd: ::c_int, flags: ::c_ulong) -> ::c_int;
10351042
pub fn lchflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int;
10361043

10371044
pub fn extattr_delete_fd(fd: ::c_int,

src/unix/bsd/netbsdlike/openbsdlike/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ pub const IP_RECVDSTADDR: ::c_int = 7;
321321
pub const IP_SENDSRCADDR: ::c_int = IP_RECVDSTADDR;
322322

323323
// sys/netinet/in.h
324+
pub const TCP_MD5SIG: ::c_int = 0x04;
324325
pub const TCP_NOPUSH: ::c_int = 0x10;
325326

326327
pub const AF_ECMA: ::c_int = 8;
@@ -667,7 +668,8 @@ pub const KERN_GLOBAL_PTRACE: ::c_int = 81;
667668
pub const KERN_CONSBUFSIZE: ::c_int = 82;
668669
pub const KERN_CONSBUF: ::c_int = 83;
669670
pub const KERN_AUDIO: ::c_int = 84;
670-
pub const KERN_MAXID: ::c_int = 85;
671+
pub const KERN_CPUSTATS: ::c_int = 85;
672+
pub const KERN_MAXID: ::c_int = 86;
671673
pub const KERN_PROC_ALL: ::c_int = 0;
672674
pub const KERN_PROC_PID: ::c_int = 1;
673675
pub const KERN_PROC_PGRP: ::c_int = 2;
@@ -710,7 +712,9 @@ f! {
710712
}
711713

712714
extern {
713-
pub fn chflagsat(fd: ::c_int, path: *const ::c_char, flags: ::c_ulong,
715+
pub fn chflags(path: *const ::c_char, flags: ::c_uint) -> ::c_int;
716+
pub fn fchflags(fd: ::c_int, flags: ::c_uint) -> ::c_int;
717+
pub fn chflagsat(fd: ::c_int, path: *const ::c_char, flags: ::c_uint,
714718
atflag: ::c_int) -> ::c_int;
715719
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
716720
pub fn getnameinfo(sa: *const ::sockaddr,

0 commit comments

Comments
 (0)