Skip to content

Commit 50fbf0c

Browse files
committed
Auto merge of #1482 - semarie:bpf-openbsd, r=gnzlbg
several const ioctl() BPF aren't defined on OpenBSD unbreak OpenBSD after #1448
2 parents ffbe923 + 3b7be3c commit 50fbf0c

File tree

6 files changed

+21
-5
lines changed

6 files changed

+21
-5
lines changed

libc-test/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ fn test_openbsd(target: &str) {
264264
"netinet/ip.h",
265265
"netinet/tcp.h",
266266
"netinet/udp.h",
267+
"net/bpf.h",
267268
"resolv.h",
268269
"pthread.h",
269270
"dlfcn.h",

src/unix/bsd/apple/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1761,6 +1761,11 @@ pub const TIOCPTYGRANT: ::c_uint = 0x20007454;
17611761
pub const TIOCPTYGNAME: ::c_uint = 0x40807453;
17621762
pub const TIOCPTYUNLK: ::c_uint = 0x20007452;
17631763

1764+
pub const BIOCGRSIG: ::c_ulong = 0x40044272;
1765+
pub const BIOCSRSIG: ::c_ulong = 0x80044273;
1766+
pub const BIOCSDLT: ::c_ulong = 0x80044278;
1767+
pub const BIOCGSEESENT: ::c_ulong = 0x40044276;
1768+
pub const BIOCSSEESENT: ::c_ulong = 0x80044277;
17641769
pub const BIOCGDLTLIST: ::c_ulong = 0xc00c4279;
17651770

17661771
pub const FIODTYPE: ::c_ulong = 0x4004667a;

src/unix/bsd/freebsdlike/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,11 @@ pub const SLIPDISC: ::c_int = 0x4;
10091009
pub const PPPDISC: ::c_int = 0x5;
10101010
pub const NETGRAPHDISC: ::c_int = 0x6;
10111011

1012+
pub const BIOCGRSIG: ::c_ulong = 0x40044272;
1013+
pub const BIOCSRSIG: ::c_ulong = 0x80044273;
1014+
pub const BIOCSDLT: ::c_ulong = 0x80044278;
1015+
pub const BIOCGSEESENT: ::c_ulong = 0x40044276;
1016+
pub const BIOCSSEESENT: ::c_ulong = 0x80044277;
10121017
pub const BIOCSETF: ::c_ulong = 0x80104267;
10131018
pub const BIOCGDLTLIST: ::c_ulong = 0xc0104279;
10141019
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;

src/unix/bsd/mod.rs

-5
Original file line numberDiff line numberDiff line change
@@ -446,13 +446,8 @@ pub const BIOCSETIF: ::c_ulong = 0x8020426c;
446446
pub const BIOCGSTATS: ::c_ulong = 0x4008426f;
447447
pub const BIOCIMMEDIATE: ::c_ulong = 0x80044270;
448448
pub const BIOCVERSION: ::c_ulong = 0x40044271;
449-
pub const BIOCGRSIG: ::c_ulong = 0x40044272;
450-
pub const BIOCSRSIG: ::c_ulong = 0x80044273;
451449
pub const BIOCGHDRCMPLT: ::c_ulong = 0x40044274;
452450
pub const BIOCSHDRCMPLT: ::c_ulong = 0x80044275;
453-
pub const BIOCGSEESENT: ::c_ulong = 0x40044276;
454-
pub const BIOCSSEESENT: ::c_ulong = 0x80044277;
455-
pub const BIOCSDLT: ::c_ulong = 0x80044278;
456451
pub const SIOCGIFADDR: ::c_ulong = 0xc0206921;
457452

458453
f! {

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

+6
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,12 @@ pub const FD_SETSIZE: usize = 0x100;
10771077

10781078
pub const ST_NOSUID: ::c_ulong = 8;
10791079

1080+
pub const BIOCGRSIG: ::c_ulong = 0x40044272;
1081+
pub const BIOCSRSIG: ::c_ulong = 0x80044273;
1082+
pub const BIOCSDLT: ::c_ulong = 0x80044278;
1083+
pub const BIOCGSEESENT: ::c_ulong = 0x40044276;
1084+
pub const BIOCSSEESENT: ::c_ulong = 0x80044277;
1085+
10801086
cfg_if! {
10811087
if #[cfg(any(target_arch = "sparc", target_arch = "sparc64",
10821088
target_arch = "x86", target_arch = "x86_64"))] {

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

+4
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,10 @@ pub const SOCK_CLOEXEC: ::c_int = 0x8000;
13071307
pub const SOCK_NONBLOCK: ::c_int = 0x4000;
13081308
pub const SOCK_DNS: ::c_int = 0x1000;
13091309

1310+
pub const BIOCGRSIG: ::c_ulong = 0x40044273;
1311+
pub const BIOCSRSIG: ::c_ulong = 0x80044272;
1312+
pub const BIOCSDLT: ::c_ulong = 0x8004427a;
1313+
13101314
pub const PTRACE_FORK: ::c_int = 0x0002;
13111315

13121316
pub const WCONTINUED: ::c_int = 8;

0 commit comments

Comments
 (0)