summaryrefslogtreecommitdiffstats
path: root/vendor/libc/src/unix/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/libc/src/unix/mod.rs')
-rw-r--r--vendor/libc/src/unix/mod.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
index ecee44411..ecc693e3d 100644
--- a/vendor/libc/src/unix/mod.rs
+++ b/vendor/libc/src/unix/mod.rs
@@ -346,13 +346,13 @@ cfg_if! {
} else if #[cfg(target_os = "emscripten")] {
#[link(name = "c")]
extern {}
- } else if #[cfg(all(target_os = "netbsd",
- feature = "rustc-dep-of-std",
- target_vendor = "rumprun"))] {
- // Since we don't use -nodefaultlibs on Rumprun, libc is always pulled
- // in automatically by the linker. We avoid passing it explicitly, as it
- // causes some versions of binutils to crash with an assertion failure.
- #[link(name = "m")]
+ } else if #[cfg(all(target_os = "android", feature = "rustc-dep-of-std"))] {
+ #[link(name = "c", kind = "static", modifiers = "-bundle",
+ cfg(target_feature = "crt-static"))]
+ #[link(name = "m", kind = "static", modifiers = "-bundle",
+ cfg(target_feature = "crt-static"))]
+ #[link(name = "m", cfg(not(target_feature = "crt-static")))]
+ #[link(name = "c", cfg(not(target_feature = "crt-static")))]
extern {}
} else if #[cfg(any(target_os = "macos",
target_os = "ios",
@@ -901,6 +901,8 @@ extern "C" {
pub fn setpgid(pid: pid_t, pgid: pid_t) -> ::c_int;
pub fn setsid() -> pid_t;
pub fn setuid(uid: uid_t) -> ::c_int;
+ pub fn setreuid(ruid: uid_t, euid: uid_t) -> ::c_int;
+ pub fn setregid(rgid: gid_t, egid: gid_t) -> ::c_int;
#[cfg_attr(
all(target_os = "macos", target_arch = "x86"),
link_name = "sleep$UNIX2003"