diff --git a/libc-test/build.rs b/libc-test/build.rs index a2d6600bc57a61e171bd2046d2138a443933e2dc..48b7d7a2d89abd7eb7264ccf4027c1127bc6b9f8 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -794,6 +794,11 @@ fn test_solarish(target: &str) { // This evaluates to a sysconf() call rather than a constant "PTHREAD_STACK_MIN" => true, + // EPOLLEXCLUSIVE is a relatively recent addition to the epoll interface and may not be + // defined on older systems. It is, however, safe to use on systems which do not + // explicitly support it. (A no-op is an acceptable implementation of EPOLLEXCLUSIVE.) + "EPOLLEXCLUSIVE" => true, + _ => false, }); diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index c60e678040037e3981a8788b815b6bbbd7a60273..98e2dc7837726bc40e849b7fe9d3105d3d104fb3 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -1838,6 +1838,7 @@ pub const EPOLLET: ::c_int = 0x80000000; pub const EPOLLRDHUP: ::c_int = 0x2000; pub const EPOLLONESHOT: ::c_int = 0x40000000; pub const EPOLLWAKEUP: ::c_int = 0x20000000; +pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000; pub const EPOLL_CLOEXEC: ::c_int = 0x80000; pub const EPOLL_CTL_ADD: ::c_int = 1; pub const EPOLL_CTL_MOD: ::c_int = 3; diff --git a/src/unix/solarish/solaris.rs b/src/unix/solarish/solaris.rs index 798622e39a95870708740488ce2d3eab7fed5fb6..596029d1bc4d23418f57763abbc513c17691db60 100644 --- a/src/unix/solarish/solaris.rs +++ b/src/unix/solarish/solaris.rs @@ -29,8 +29,6 @@ s! { pub const PORT_SOURCE_POSTWAIT: ::c_int = 8; pub const PORT_SOURCE_SIGNAL: ::c_int = 9; -pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000; - pub const AF_LOCAL: ::c_int = 0; pub const AF_FILE: ::c_int = 0;