Skip to content

Commit d8fc4b2

Browse files
committed
Auto merge of #2083 - jasonbking:illumos, r=JohnTitor
Add additional illumos and Solaris constants This adds some additional constants for `fcntl(2)` and `setsockopt(3SOCKET)`.
2 parents 83d8c39 + 0f8e3d0 commit d8fc4b2

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/unix/solarish/illumos.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ pub const TCP_KEEPCNT: ::c_int = 35;
2727
pub const TCP_KEEPINTVL: ::c_int = 36;
2828
pub const TCP_CONGESTION: ::c_int = 37;
2929

30+
pub const F_OFD_GETLK: ::c_int = 50;
31+
pub const F_OFD_SETLKL: ::c_int = 51;
32+
pub const F_OFD_SETLKW: ::c_int = 52;
33+
pub const F_FLOCK: ::c_int = 55;
34+
pub const F_FLOCKW: ::c_int = 56;
35+
3036
extern "C" {
3137
pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
3238

src/unix/solarish/mod.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,10 +946,15 @@ pub const SIGEV_NONE: ::c_int = 1;
946946
pub const SIGEV_SIGNAL: ::c_int = 2;
947947
pub const SIGEV_THREAD: ::c_int = 3;
948948

949+
pub const IP_RECVDSTADDR: ::c_int = 0x7;
950+
pub const IP_SEC_OPT: ::c_int = 0x22;
951+
949952
pub const IPV6_UNICAST_HOPS: ::c_int = 0x5;
950953
pub const IPV6_MULTICAST_IF: ::c_int = 0x6;
951954
pub const IPV6_MULTICAST_HOPS: ::c_int = 0x7;
952955
pub const IPV6_MULTICAST_LOOP: ::c_int = 0x8;
956+
pub const IPV6_RECVPKTINFO: ::c_int = 0x12;
957+
pub const IPV6_SEC_OPT: ::c_int = 0x22;
953958
pub const IPV6_V6ONLY: ::c_int = 0x27;
954959

955960
cfg_if! {
@@ -999,6 +1004,7 @@ pub const O_SEARCH: ::c_int = 0x200000;
9991004
pub const O_EXEC: ::c_int = 0x400000;
10001005
pub const O_CLOEXEC: ::c_int = 0x800000;
10011006
pub const O_ACCMODE: ::c_int = 0x600003;
1007+
pub const O_XATTR: ::c_int = 0x4000;
10021008
pub const S_IFIFO: mode_t = 4096;
10031009
pub const S_IFCHR: mode_t = 8192;
10041010
pub const S_IFBLK: mode_t = 24576;
@@ -1037,6 +1043,12 @@ pub const F_DUPFD_CLOEXEC: ::c_int = 37;
10371043
pub const F_SETLK: ::c_int = 6;
10381044
pub const F_SETLKW: ::c_int = 7;
10391045
pub const F_GETLK: ::c_int = 14;
1046+
pub const F_ALLOCSP: ::c_int = 10;
1047+
pub const F_FREESP: ::c_int = 11;
1048+
pub const F_BLOCKS: ::c_int = 18;
1049+
pub const F_BLKSIZE: ::c_int = 19;
1050+
pub const F_SHARE: ::c_int = 40;
1051+
pub const F_UNSHARE: ::c_int = 41;
10401052
pub const SIGHUP: ::c_int = 1;
10411053
pub const SIGINT: ::c_int = 2;
10421054
pub const SIGQUIT: ::c_int = 3;
@@ -1265,10 +1277,13 @@ pub const EAI_SYSTEM: ::c_int = 11;
12651277
pub const EAI_OVERFLOW: ::c_int = 12;
12661278

12671279
pub const F_DUPFD: ::c_int = 0;
1280+
pub const F_DUP2FD: ::c_int = 9;
1281+
pub const F_DUP2FD_CLOEXEC: ::c_int = 36;
12681282
pub const F_GETFD: ::c_int = 1;
12691283
pub const F_SETFD: ::c_int = 2;
12701284
pub const F_GETFL: ::c_int = 3;
12711285
pub const F_SETFL: ::c_int = 4;
1286+
pub const F_GETXFL: ::c_int = 45;
12721287

12731288
pub const SIGTRAP: ::c_int = 5;
12741289

@@ -1416,6 +1431,8 @@ pub const TCP_RTO_MIN: ::c_int = 0x1a;
14161431
pub const TCP_RTO_MAX: ::c_int = 0x1b;
14171432
pub const TCP_LINGER2: ::c_int = 0x1c;
14181433

1434+
pub const UDP_NAT_T_ENDPOINT: ::c_int = 0x0103;
1435+
14191436
pub const SOL_SOCKET: ::c_int = 0xffff;
14201437
pub const SO_DEBUG: ::c_int = 0x01;
14211438
pub const SO_ACCEPTCONN: ::c_int = 0x0002;

0 commit comments

Comments
 (0)