diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2017-08-28 00:09:44 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2017-08-28 00:09:44 +0000 |
commit | 202f30e64df0e43493db28473d15048d686ea31f (patch) | |
tree | 5254e08504fe7a9a4ed0b52103926c0e2b53802b /src/sys/memfd.rs | |
parent | 28c5b4a41a45a3ee5ec6c88927388b208f0449c3 (diff) | |
parent | d322aa9a3f8e685eb6f48843f22ec12127f6251d (diff) | |
download | nix-202f30e64df0e43493db28473d15048d686ea31f.zip |
Merge #747
747: Use libc types for sched and syscall FFI r=Susurrus a=Susurrus
Diffstat (limited to 'src/sys/memfd.rs')
-rw-r--r-- | src/sys/memfd.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sys/memfd.rs b/src/sys/memfd.rs index b9812943..056e9e43 100644 --- a/src/sys/memfd.rs +++ b/src/sys/memfd.rs @@ -11,8 +11,9 @@ bitflags!( ); pub fn memfd_create(name: &CStr, flags: MemFdCreateFlag) -> Result<RawFd> { - use sys::syscall::{syscall, MEMFD_CREATE}; - let res = unsafe { syscall(MEMFD_CREATE, name.as_ptr(), flags.bits()) }; + let res = unsafe { + libc::syscall(libc::SYS_memfd_create, name.as_ptr(), flags.bits()) + }; Errno::result(res).map(|r| r as RawFd) } |