From 3cbded2c51574bfdefe8d26a9c6ff235c7330b59 Mon Sep 17 00:00:00 2001 From: Zach Reizner Date: Wed, 30 Aug 2017 17:07:01 -0700 Subject: fix armv7a and aarch64 build errors and warnings BUG=None TEST=cargo build --target=armv7a-cros-linux-gnueabi && cargo build --target=aarch64-cros-linux-gnu Change-Id: I954c152f3c8086e24c4809dd5aabb5043fdd63af Reviewed-on: https://chromium-review.googlesource.com/644408 Commit-Ready: Zach Reizner Tested-by: Zach Reizner Reviewed-by: Jason Clinton Reviewed-by: Stephen Barber Reviewed-by: Dylan Reid --- sys_util/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys_util/src/lib.rs') diff --git a/sys_util/src/lib.rs b/sys_util/src/lib.rs index 3574f98..7610d4e 100644 --- a/sys_util/src/lib.rs +++ b/sys_util/src/lib.rs @@ -52,7 +52,7 @@ pub use signalfd::Error as SignalFdError; use std::ptr; -use libc::{kill, syscall, waitpid, pid_t, uid_t, gid_t, SIGKILL, WNOHANG}; +use libc::{kill, syscall, waitpid, c_long, pid_t, uid_t, gid_t, SIGKILL, WNOHANG}; use syscall_defines::linux::LinuxSyscall::SYS_getpid; @@ -61,7 +61,7 @@ use syscall_defines::linux::LinuxSyscall::SYS_getpid; #[inline(always)] pub fn getpid() -> pid_t { // Safe because this syscall can never fail and we give it a valid syscall number. - unsafe { syscall(SYS_getpid as i64) as pid_t } + unsafe { syscall(SYS_getpid as c_long) as pid_t } } /// Safe wrapper for `geteuid(2)`. -- cgit 1.4.1