Skip to content

Commit 7040aae

Browse files
authored
Merge pull request #1790 from pfmooney/illumos-updates
Add constants and eventfd to illumos
2 parents 0a60b22 + b53ccb8 commit 7040aae

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,7 @@ fn test_solarish(target: &str) {
707707
"stdlib.h",
708708
"string.h",
709709
"sys/epoll.h",
710+
"sys/eventfd.h",
710711
"sys/file.h",
711712
"sys/filio.h",
712713
"sys/ioctl.h",

src/unix/solarish/illumos.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ s! {
1818
pub const AF_LOCAL: ::c_int = 1; // AF_UNIX
1919
pub const AF_FILE: ::c_int = 1; // AF_UNIX
2020

21+
pub const EFD_SEMAPHORE: ::c_int = 0x1;
22+
pub const EFD_NONBLOCK: ::c_int = 0x800;
23+
pub const EFD_CLOEXEC: ::c_int = 0x80000;
24+
2125
extern "C" {
26+
pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
27+
2228
pub fn mincore(
2329
addr: ::caddr_t,
2430
len: ::size_t,

src/unix/solarish/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,8 @@ pub const EOF: ::c_int = -1;
950950
pub const SEEK_SET: ::c_int = 0;
951951
pub const SEEK_CUR: ::c_int = 1;
952952
pub const SEEK_END: ::c_int = 2;
953+
pub const SEEK_DATA: ::c_int = 3;
954+
pub const SEEK_HOLE: ::c_int = 4;
953955
pub const _IOFBF: ::c_int = 0;
954956
pub const _IONBF: ::c_int = 4;
955957
pub const _IOLBF: ::c_int = 64;
@@ -1835,6 +1837,7 @@ pub const EPOLLHUP: ::c_int = 0x10;
18351837
pub const EPOLLET: ::c_int = 0x80000000;
18361838
pub const EPOLLRDHUP: ::c_int = 0x2000;
18371839
pub const EPOLLONESHOT: ::c_int = 0x40000000;
1840+
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
18381841
pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
18391842
pub const EPOLL_CTL_ADD: ::c_int = 1;
18401843
pub const EPOLL_CTL_MOD: ::c_int = 3;

0 commit comments

Comments
 (0)