diff --git a/libc-test/build.rs b/libc-test/build.rs index 56ea246660dd4909214a9f510f631664cbc27a1d..f9de7b313b9c9f79993387447b567faa1e5c871c 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -707,6 +707,7 @@ fn test_solarish(target: &str) { "stdlib.h", "string.h", "sys/epoll.h", + "sys/eventfd.h", "sys/file.h", "sys/filio.h", "sys/ioctl.h", diff --git a/src/unix/solarish/illumos.rs b/src/unix/solarish/illumos.rs index 42b4af39d3a375d9b16f6a5b7ae9dac8b23fe7a7..b52a5f08954b1932aa0b25c4790d833a5be61ea9 100644 --- a/src/unix/solarish/illumos.rs +++ b/src/unix/solarish/illumos.rs @@ -18,7 +18,13 @@ s! { pub const AF_LOCAL: ::c_int = 1; // AF_UNIX pub const AF_FILE: ::c_int = 1; // AF_UNIX +pub const EFD_SEMAPHORE: ::c_int = 0x1; +pub const EFD_NONBLOCK: ::c_int = 0x800; +pub const EFD_CLOEXEC: ::c_int = 0x80000; + extern "C" { + pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; + pub fn mincore( addr: ::caddr_t, len: ::size_t, diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index 4d33f66a209b7a65db5b5296e096f747566be7a7..c30e11593d69498ac9d0ea02f1b688f80de7247f 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -950,6 +950,8 @@ pub const EOF: ::c_int = -1; pub const SEEK_SET: ::c_int = 0; pub const SEEK_CUR: ::c_int = 1; pub const SEEK_END: ::c_int = 2; +pub const SEEK_DATA: ::c_int = 3; +pub const SEEK_HOLE: ::c_int = 4; pub const _IOFBF: ::c_int = 0; pub const _IONBF: ::c_int = 4; pub const _IOLBF: ::c_int = 64; @@ -1835,6 +1837,7 @@ pub const EPOLLHUP: ::c_int = 0x10; 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 EPOLL_CLOEXEC: ::c_int = 0x80000; pub const EPOLL_CTL_ADD: ::c_int = 1; pub const EPOLL_CTL_MOD: ::c_int = 3;