From c51e91b9b46acc7d0354b1cc62d2b1ab7c2c6cd7 Mon Sep 17 00:00:00 2001 From: Jan S Date: Sat, 10 Jun 2017 09:06:14 +0200 Subject: [PATCH 1/2] OpenBSD kqueue EV_RECEIPT and EV_DISPATCH OpenBSDs kqueue now has EV_RECEIPT and EV_DISPATCH. I wrote a patch and the devs merged it into current: https://marc.info/?l=openbsd-tech&m=149621427511219&w=2 This change extends the rust libc crate to provide the feature. --- src/unix/bsd/netbsdlike/openbsdlike/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/unix/bsd/netbsdlike/openbsdlike/mod.rs b/src/unix/bsd/netbsdlike/openbsdlike/mod.rs index 5bea8ad513ac..37c7708f1401 100644 --- a/src/unix/bsd/netbsdlike/openbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsdlike/mod.rs @@ -431,6 +431,8 @@ pub const EV_ENABLE: ::uint16_t = 0x4; pub const EV_DISABLE: ::uint16_t = 0x8; pub const EV_ONESHOT: ::uint16_t = 0x10; pub const EV_CLEAR: ::uint16_t = 0x20; +pub const EV_RECEIPT: ::uint16_t = 0x40; +pub const EV_DISPATCH: ::uint16_t = 0x80; pub const EV_FLAG1: ::uint16_t = 0x2000; pub const EV_ERROR: ::uint16_t = 0x4000; pub const EV_EOF: ::uint16_t = 0x8000; From 7e349c0be6f4a584701b9f56e7f0a83bfdc1fea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Marie?= Date: Sun, 13 Aug 2017 13:54:04 +0200 Subject: [PATCH 2/2] Add exception in testsuite: the constants are new they will be released with OpenBSD 6.2 --- libc-test/build.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 9e4b9438fe1e..b907e3cc9bd5 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -440,6 +440,9 @@ fn main() { "KERN_USERMOUNT" | "KERN_ARND" if openbsd => true, + // These constats were added in OpenBSD 6.2 + "EV_RECEIPT" | "EV_DISPATCH" 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" |