summaryrefslogtreecommitdiff
path: root/src/sys/memfd.rs
diff options
context:
space:
mode:
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)
}