diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index e8f97e4edeb08..4b2c3e02b3003 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -838,6 +838,12 @@ pub const NI_MAXHOST: ::socklen_t = 1025; pub const Q_GETQUOTA: ::c_int = 0x300; pub const Q_SETQUOTA: ::c_int = 0x400; +pub const RTLD_LOCAL: ::c_int = 0x4; +pub const RTLD_FIRST: ::c_int = 0x100; +pub const RTLD_NODELETE: ::c_int = 0x80; +pub const RTLD_NOLOAD: ::c_int = 0x10; +pub const RTLD_GLOBAL: ::c_int = 0x8; + extern { pub fn getnameinfo(sa: *const ::sockaddr, salen: ::socklen_t, diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 9f2b172e30697..d2e3a4e3e243e 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -573,6 +573,11 @@ pub const NI_MAXHOST: ::size_t = 1025; pub const Q_GETQUOTA: ::c_int = 0x700; pub const Q_SETQUOTA: ::c_int = 0x800; +pub const RTLD_LOCAL: ::c_int = 0; +pub const RTLD_NODELETE: ::c_int = 0x1000; +pub const RTLD_NOLOAD: ::c_int = 0x2000; +pub const RTLD_GLOBAL: ::c_int = 0x100; + extern { pub fn getnameinfo(sa: *const ::sockaddr, salen: ::socklen_t, diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index 027033bcec963..2a0104c209a75 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -263,6 +263,8 @@ pub const NOFLSH: ::tcflag_t = 0x80000000; pub const WNOHANG: ::c_int = 1; +pub const RTLD_NOW: ::c_int = 0x2; + f! { pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8; diff --git a/src/unix/bsd/openbsdlike/mod.rs b/src/unix/bsd/openbsdlike/mod.rs index 1ef5938c7e6aa..2f4b5becdf63c 100644 --- a/src/unix/bsd/openbsdlike/mod.rs +++ b/src/unix/bsd/openbsdlike/mod.rs @@ -370,6 +370,8 @@ pub const KERN_PROC_ARGV: ::c_int = 1; pub const Q_GETQUOTA: ::c_int = 0x300; pub const Q_SETQUOTA: ::c_int = 0x400; +pub const RTLD_GLOBAL: ::c_int = 0x100; + extern { pub fn mincore(addr: *mut ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int; diff --git a/src/unix/bsd/openbsdlike/netbsd.rs b/src/unix/bsd/openbsdlike/netbsd.rs index 51d5b3fee78aa..9ddb253f9b7be 100644 --- a/src/unix/bsd/openbsdlike/netbsd.rs +++ b/src/unix/bsd/openbsdlike/netbsd.rs @@ -325,6 +325,9 @@ pub const TMP_MAX : ::c_uint = 308915776; pub const NI_MAXHOST: ::socklen_t = 1025; +pub const RTLD_NOLOAD: ::c_int = 0x2000; +pub const RTLD_LOCAL: ::c_int = 0x200; + extern { pub fn getnameinfo(sa: *const ::sockaddr, salen: ::socklen_t, diff --git a/src/unix/bsd/openbsdlike/openbsd.rs b/src/unix/bsd/openbsdlike/openbsd.rs index 3f9841d923e1f..8b6d80dc1d073 100644 --- a/src/unix/bsd/openbsdlike/openbsd.rs +++ b/src/unix/bsd/openbsdlike/openbsd.rs @@ -222,6 +222,8 @@ pub const TMP_MAX : ::c_uint = 0x7fffffff; pub const NI_MAXHOST: ::size_t = 256; +pub const RTLD_LOCAL: ::c_int = 0; + extern { pub fn getnameinfo(sa: *const ::sockaddr, salen: ::socklen_t, diff --git a/src/unix/mod.rs b/src/unix/mod.rs index fb3f270b9cf3a..c56246a32a002 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -131,6 +131,8 @@ pub const POLLNVAL: ::c_short = 0x20; pub const IF_NAMESIZE: ::size_t = 16; +pub const RTLD_LAZY: ::c_int = 0x1; + cfg_if! { if #[cfg(not(stdbuild))] { // cargo build, don't pull in anything extra as the libstd dep diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs index f6d47a3e094a3..926dff17ccb3e 100644 --- a/src/unix/notbsd/android/mod.rs +++ b/src/unix/notbsd/android/mod.rs @@ -505,6 +505,10 @@ pub const TIOCMSET: ::c_int = 0x5418; pub const FIONREAD: ::c_int = 0x541B; pub const TIOCCONS: ::c_int = 0x541D; +pub const RTLD_GLOBAL: ::c_int = 0x2; +pub const RTLD_NOLOAD: ::c_int = 0x4; +pub const RTLD_NOW: ::c_int = 0; + f! { pub fn sigemptyset(set: *mut sigset_t) -> ::c_int { *set = 0; diff --git a/src/unix/notbsd/linux/mips.rs b/src/unix/notbsd/linux/mips.rs index b809a7f2d3cf7..021902d411816 100644 --- a/src/unix/notbsd/linux/mips.rs +++ b/src/unix/notbsd/linux/mips.rs @@ -468,6 +468,10 @@ pub const TIOCMSET: ::c_ulong = 0x741a; pub const FIONREAD: ::c_ulong = 0x467f; pub const TIOCCONS: ::c_ulong = 0x80047478; +pub const RTLD_DEEPBIND: ::c_int = 0x10; +pub const RTLD_GLOBAL: ::c_int = 0x4; +pub const RTLD_NOLOAD: ::c_int = 0x8; + extern { pub fn sysctl(name: *mut ::c_int, namelen: ::c_int, diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index 9a9ecc47b30ff..95345429ab876 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -317,6 +317,8 @@ pub const ST_NODIRATIME: ::c_ulong = 2048; pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void; pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; +pub const RTLD_NODELETE: ::c_int = 0x1000; +pub const RTLD_NOW: ::c_int = 0x2; #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub const MAP_32BIT: ::c_int = 0x0040; diff --git a/src/unix/notbsd/linux/musl/mod.rs b/src/unix/notbsd/linux/musl/mod.rs index 1ee023336fc7f..1cbfd8f25e57a 100644 --- a/src/unix/notbsd/linux/musl/mod.rs +++ b/src/unix/notbsd/linux/musl/mod.rs @@ -145,6 +145,9 @@ pub const TCSAFLUSH: ::c_int = 2; pub const TIOCINQ: ::c_ulong = ::FIONREAD; +pub const RTLD_GLOBAL: ::c_int = 0x100; +pub const RTLD_NOLOAD: ::c_int = 0x4; + extern { pub fn getnameinfo(sa: *const ::sockaddr, salen: ::socklen_t, diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs index fbc5bd2075748..ed0a3378f990f 100644 --- a/src/unix/notbsd/linux/other/mod.rs +++ b/src/unix/notbsd/linux/other/mod.rs @@ -399,6 +399,10 @@ pub const TIOCMSET: ::c_ulong = 0x5418; pub const FIONREAD: ::c_ulong = 0x541B; pub const TIOCCONS: ::c_ulong = 0x541D; +pub const RTLD_DEEPBIND: ::c_int = 0x8; +pub const RTLD_GLOBAL: ::c_int = 0x100; +pub const RTLD_NOLOAD: ::c_int = 0x4; + cfg_if! { if #[cfg(any(target_arch = "arm", target_arch = "x86", target_arch = "x86_64"))] { diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index 278c2a612aeab..f213a52a74411 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -532,6 +532,8 @@ pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02; pub const SPLICE_F_MORE: ::c_uint = 0x04; pub const SPLICE_F_GIFT: ::c_uint = 0x08; +pub const RTLD_LOCAL: ::c_int = 0; + f! { pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { let fd = fd as usize;