From d5af8f48518313bbefabd211364c2f06f3654b24 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 28 Jun 2024 23:29:59 -0700 Subject: [PATCH] feat(power-management-core): hackfix to get sysctls working with tokio Signed-off-by: Ariadne Conill --- crates/xen/xencall/src/lib.rs | 6 +++--- crates/xen/xencall/src/sys.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/xen/xencall/src/lib.rs b/crates/xen/xencall/src/lib.rs index f2496db..4e606f3 100644 --- a/crates/xen/xencall/src/lib.rs +++ b/crates/xen/xencall/src/lib.rs @@ -98,7 +98,7 @@ impl XenCall { value: SysctlValue { cputopoinfo: SysctlCputopoinfo { num_cpus: 0, - handle: null_mut(), + handle: 0, }, }, }; @@ -958,7 +958,7 @@ impl XenCall { value: SysctlValue { cputopoinfo: SysctlCputopoinfo { num_cpus: 0, - handle: null_mut(), + handle: 0, }, }, }; @@ -979,7 +979,7 @@ impl XenCall { value: SysctlValue { cputopoinfo: SysctlCputopoinfo { num_cpus: cpus, - handle: topos.as_mut_ptr(), + handle: topos.as_mut_ptr() as c_ulong, }, }, }; diff --git a/crates/xen/xencall/src/sys.rs b/crates/xen/xencall/src/sys.rs index 32ca833..0918280 100644 --- a/crates/xen/xencall/src/sys.rs +++ b/crates/xen/xencall/src/sys.rs @@ -747,7 +747,7 @@ pub struct SysctlPmOp { #[derive(Clone, Copy, Debug)] pub struct SysctlCputopoinfo { pub num_cpus: u32, - pub handle: *mut SysctlCputopo, + pub handle: c_ulong, } #[repr(C)]