summaryrefslogtreecommitdiff
path: root/src/unistd.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2017-08-28 00:09:44 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2017-08-28 00:09:44 +0000
commit202f30e64df0e43493db28473d15048d686ea31f (patch)
tree5254e08504fe7a9a4ed0b52103926c0e2b53802b /src/unistd.rs
parent28c5b4a41a45a3ee5ec6c88927388b208f0449c3 (diff)
parentd322aa9a3f8e685eb6f48843f22ec12127f6251d (diff)
downloadnix-202f30e64df0e43493db28473d15048d686ea31f.zip
Merge #747
747: Use libc types for sched and syscall FFI r=Susurrus a=Susurrus
Diffstat (limited to 'src/unistd.rs')
-rw-r--r--src/unistd.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/unistd.rs b/src/unistd.rs
index af38cf2d..fad51272 100644
--- a/src/unistd.rs
+++ b/src/unistd.rs
@@ -16,7 +16,7 @@ use sys::stat::Mode;
use std::fmt;
#[cfg(any(target_os = "android", target_os = "linux"))]
-pub use self::linux::*;
+pub use self::pivot_root::*;
#[cfg(any(target_os = "android", target_os = "freebsd",
target_os = "linux", target_os = "openbsd"))]
@@ -1647,8 +1647,8 @@ pub fn sysconf(var: SysconfVar) -> Result<Option<c_long>> {
}
#[cfg(any(target_os = "android", target_os = "linux"))]
-mod linux {
- use sys::syscall::{syscall, SYSPIVOTROOT};
+mod pivot_root {
+ use libc;
use {Errno, Result, NixPath};
pub fn pivot_root<P1: ?Sized + NixPath, P2: ?Sized + NixPath>(
@@ -1656,7 +1656,7 @@ mod linux {
let res = try!(try!(new_root.with_nix_path(|new_root| {
put_old.with_nix_path(|put_old| {
unsafe {
- syscall(SYSPIVOTROOT, new_root.as_ptr(), put_old.as_ptr())
+ libc::syscall(libc::SYS_pivot_root, new_root.as_ptr(), put_old.as_ptr())
}
})
})));