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 <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
This commit is contained in:
Sonny Rao 2018-05-08 18:47:46 -07:00 committed by chrome-bot
parent 5165cb7eec
commit 17bd06f65b

View file

@ -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.