From 17bd06f65b51d1f5b484062ce3d994b576015fba Mon Sep 17 00:00:00 2001 From: Sonny Rao Date: Tue, 8 May 2018 18:47:46 -0700 Subject: [PATCH] sys_util: SharedMemory: fix signature for memfd_create syscall The signature for this system call was wrong, but somehow managed to work on x86_64. This should fix it to work on all architectures. BUG=chromium:840048 TEST=build_test passes TEST=virtio wayland works on ARM Change-Id: I295548357f688be4772e65991fb65178ead3b1e8 Reviewed-on: https://chromium-review.googlesource.com/1050915 Commit-Ready: Sonny Rao Tested-by: Sonny Rao Reviewed-by: Dylan Reid Reviewed-by: Zach Reizner --- sys_util/src/shm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys_util/src/shm.rs b/sys_util/src/shm.rs index 3769cc3c6c..c6e28840a7 100644 --- a/sys_util/src/shm.rs +++ b/sys_util/src/shm.rs @@ -26,7 +26,7 @@ pub struct SharedMemory { const MFD_CLOEXEC: c_uint = 0x0001; unsafe fn memfd_create(name: *const c_char, flags: c_uint) -> c_int { - syscall(SYS_memfd_create as c_long, name as i64, flags as i64) as c_int + syscall(SYS_memfd_create as c_long, name, flags) as c_int } /// A set of memfd seals.