summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-10 23:54:42 +0000
committerbors <bors@rust-lang.org>2022-09-10 23:54:42 +0000
commit6ab03598bce2308c77ecf03bb67ea71c395601a6 (patch)
tree13e935aa265c6c81ce628941afa87c70eb4a60bf
parent9667d5f9626ea231e40dec35abb6b5e9c8921b38 (diff)
parent89aacef2eca3434e68afc1804279c3c29bd8c5a7 (diff)
downloadrust-libc-6ab03598bce2308c77ecf03bb67ea71c395601a6.tar.gz
Auto merge of #2900 - gco:master, r=JohnTitor
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 ee67346c76..eb924b5618 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,