Skip to content

Commit

Permalink
fcntl F_DUPFD_CLOEXEC has different values on Solaris and Illumos
Browse files Browse the repository at this point in the history
  • Loading branch information
gco committed Sep 5, 2022
1 parent f1c3cfe commit 6d70352
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
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;

// fcntl F_DUPFD_CLOEXEC has different values on Solaris and Illumos
pub const F_DUPFD_CLOEXEC: ::c_int = 37;

pub const FIL_ATTACH: ::c_int = 0x1;
pub const FIL_DETACH: ::c_int = 0x2;
pub const FIL_LIST: ::c_int = 0x3;
Expand Down
1 change: 0 additions & 1 deletion 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
3 changes: 3 additions & 0 deletions src/unix/solarish/solaris.rs
Expand Up @@ -36,6 +36,9 @@ pub const TCP_KEEPIDLE: ::c_int = 0x1d;
pub const TCP_KEEPCNT: ::c_int = 0x1e;
pub const TCP_KEEPINTVL: ::c_int = 0x1f;

// fcntl F_DUPFD_CLOEXEC has different values on Solaris and Illumos
pub const F_DUPFD_CLOEXEC: ::c_int = 47;

extern "C" {
pub fn fexecve(
fd: ::c_int,
Expand Down

0 comments on commit 6d70352

Please sign in to comment.