summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgco <gco@jazzhaiku.com>2022-09-05 13:47:26 -0700
committergco <gco@jazzhaiku.com>2022-09-05 14:07:47 -0700
commit89aacef2eca3434e68afc1804279c3c29bd8c5a7 (patch)
treea4d5da0f50b6a09ee4bcf2e78473de398345b72d
parentf1c3cfea63344a508764001d7cfd48f39217439e (diff)
downloadrust-libc-89aacef2eca3434e68afc1804279c3c29bd8c5a7.tar.gz
fcntl F_DUPFD_CLOEXEC has different values on Solaris and Illumos
-rw-r--r--src/unix/solarish/illumos.rs3
-rw-r--r--src/unix/solarish/mod.rs2
-rw-r--r--src/unix/solarish/solaris.rs5
3 files changed, 8 insertions, 2 deletions
diff --git a/src/unix/solarish/illumos.rs b/src/unix/solarish/illumos.rs
index c86c6d69d0..daf9e69758 100644
--- a/src/unix/solarish/illumos.rs
+++ b/src/unix/solarish/illumos.rs
@@ -42,6 +42,9 @@ pub const F_OFD_SETLKW: ::c_int = 49;
pub const F_FLOCK: ::c_int = 53;
pub const F_FLOCKW: ::c_int = 54;
+pub const F_DUPFD_CLOEXEC: ::c_int = 37;
+pub const F_DUP2FD_CLOEXEC: ::c_int = 36;
+
pub const FIL_ATTACH: ::c_int = 0x1;
pub const FIL_DETACH: ::c_int = 0x2;
pub const FIL_LIST: ::c_int = 0x3;
diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs
index fef08d08f4..6b98fd3e94 100644
--- a/src/unix/solarish/mod.rs
+++ b/src/unix/solarish/mod.rs
@@ -1327,7 +1327,6 @@ pub const F_LOCK: ::c_int = 1;
pub const F_TEST: ::c_int = 3;
pub const F_TLOCK: ::c_int = 2;
pub const F_ULOCK: ::c_int = 0;
-pub const F_DUPFD_CLOEXEC: ::c_int = 37;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;
pub const F_GETLK: ::c_int = 14;
@@ -1601,7 +1600,6 @@ pub const NI_NUMERICSCOPE: ::c_uint = 0x0040;
pub const F_DUPFD: ::c_int = 0;
pub const F_DUP2FD: ::c_int = 9;
-pub const F_DUP2FD_CLOEXEC: ::c_int = 36;
pub const F_GETFD: ::c_int = 1;
pub const F_SETFD: ::c_int = 2;
pub const F_GETFL: ::c_int = 3;
diff --git a/src/unix/solarish/solaris.rs b/src/unix/solarish/solaris.rs
index 8ea070c6db..bab3095456 100644
--- a/src/unix/solarish/solaris.rs
+++ b/src/unix/solarish/solaris.rs
@@ -36,6 +36,11 @@ pub const TCP_KEEPIDLE: ::c_int = 0x1d;
pub const TCP_KEEPCNT: ::c_int = 0x1e;
pub const TCP_KEEPINTVL: ::c_int = 0x1f;
+pub const F_DUPFD_CLOEXEC: ::c_int = 47;
+pub const F_DUPFD_CLOFORK: ::c_int = 49;
+pub const F_DUP2FD_CLOEXEC: ::c_int = 48;
+pub const F_DUP2FD_CLOFORK: ::c_int = 50;
+
extern "C" {
pub fn fexecve(
fd: ::c_int,