Skip to content

Commit

Permalink
Auto merge of #2900 - gco:master, r=JohnTitor
Browse files Browse the repository at this point in the history
fcntl F_DUPFD_CLOEXEC has different values on Solaris and Illumos
  • Loading branch information
bors committed Sep 10, 2022
2 parents 9667d5f + 89aacef commit 6ab0359
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/unix/solarish/illumos.rs
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/unix/solarish/mod.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions src/unix/solarish/solaris.rs
Expand Up @@ -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,
Expand Down

0 comments on commit 6ab0359

Please sign in to comment.