From bf5234b06fbb1ed8de63bcec1b3cae8c4aa817ef Mon Sep 17 00:00:00 2001 From: losfair Date: Wed, 29 Jan 2020 01:07:23 +0800 Subject: [PATCH] Fix kernel-loader with musl. --- lib/kernel-loader/src/service.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/kernel-loader/src/service.rs b/lib/kernel-loader/src/service.rs index 2477cc30f..8b5f9eec4 100644 --- a/lib/kernel-loader/src/service.rs +++ b/lib/kernel-loader/src/service.rs @@ -170,7 +170,7 @@ impl ServiceContext { let ret = unsafe { ::libc::ioctl( fd, - Command::LoadCode as i32 as ::libc::c_ulong, + Command::LoadCode as i32 as _, &req as *const _ as ::libc::c_ulong, ) }; @@ -193,7 +193,7 @@ impl ServiceContext { let err = unsafe { ::libc::ioctl( fd, - Command::RunCode as i32 as ::libc::c_ulong, + Command::RunCode as i32 as _, &mut req as *mut _ as ::libc::c_ulong, ) }; @@ -221,7 +221,7 @@ impl ServiceContext { let err = unsafe { ::libc::ioctl( fd, - Command::ReadMemory as i32 as ::libc::c_ulong, + Command::ReadMemory as i32 as _, &req as *const _ as ::libc::c_ulong, ) }; @@ -242,7 +242,7 @@ impl ServiceContext { let err = unsafe { ::libc::ioctl( fd, - Command::WriteMemory as i32 as ::libc::c_ulong, + Command::WriteMemory as i32 as _, &req as *const _ as ::libc::c_ulong, ) };