summaryrefslogtreecommitdiff
path: root/src/sys/memfd.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/sys/memfd.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/sys/memfd.rs')
-rw-r--r--src/sys/memfd.rs5
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)
}