diff options
author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-07-18 10:49:07 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-18 10:49:07 +0900 |
commit | 8d90baf82c6ef8af531ea44653e5f72b4d9dd6bc (patch) | |
tree | ba1a21b06ddefece119559dc05fd466da9c7a213 | |
parent | 8e90fcb50ef80eefcbc03a2d430ad8f20b6a6967 (diff) | |
parent | e1b9757128ccfe9d7c83dfda7a958818925a422d (diff) | |
download | rust-libc-8d90baf82c6ef8af531ea44653e5f72b4d9dd6bc.tar.gz |
Merge pull request #1824 from pfmooney/illumos-epollexclusive
Expose EPOLLEXCLUSIVE on illumos platform
-rw-r--r-- | libc-test/build.rs | 5 | ||||
-rw-r--r-- | src/unix/solarish/mod.rs | 1 | ||||
-rw-r--r-- | src/unix/solarish/solaris.rs | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index a2d6600bc5..48b7d7a2d8 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 c60e678040..98e2dc7837 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 798622e39a..596029d1bc 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; |