From 2215fd05706b11e604c616ffea9630c7e92c2d0c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 20 Dec 2024 11:29:00 -0500 Subject: [PATCH] Work around 32/64 bit mismatch Fixes #325. --- procfs/src/process/tests.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/procfs/src/process/tests.rs b/procfs/src/process/tests.rs index ec7e4e3..b138bb9 100644 --- a/procfs/src/process/tests.rs +++ b/procfs/src/process/tests.rs @@ -1,5 +1,6 @@ use super::*; use rustix::process::Resource; +use std::convert::TryInto; fn check_unwrap(prc: &Process, val: ProcResult) -> Option { match val { @@ -458,7 +459,7 @@ fn test_proc_auxv() { if k != 16 { // for reasons i do not understand, getauxval(AT_HWCAP) doesn't return the expected // value - assert_eq!(v, unsafe { libc::getauxval(k) }); + assert_eq!(v, unsafe { libc::getauxval(k.try_into().unwrap()).into() }); } } }