From 52a276fbdb866da4fbd12a8290ae665fd285214f Mon Sep 17 00:00:00 2001 From: Jakob Naucke Date: Mon, 29 Mar 2021 17:23:46 +0200 Subject: [PATCH] agent: Fix type for PROC_SUPER_MAGIC on s390x statfs f_types are long on most architectures, but not on s390x, where they are uint. Following the fix in rust-lang/libc at https://github.com/rust-lang/libc/pull/1999, the custom defined PROC_SUPER_MAGIC must be updated in a similar way. Fixes: #1204 Signed-off-by: Jakob Naucke --- src/agent/rustjail/src/mount.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/agent/rustjail/src/mount.rs b/src/agent/rustjail/src/mount.rs index 76bd57a3a..150c4568c 100644 --- a/src/agent/rustjail/src/mount.rs +++ b/src/agent/rustjail/src/mount.rs @@ -52,10 +52,12 @@ const MOUNTINFOFORMAT: &str = "{d} {d} {d}:{d} {} {} {} {}"; const PROC_PATH: &str = "/proc"; // since libc didn't defined this const for musl, thus redefined it here. -#[cfg(all(target_os = "linux", target_env = "gnu"))] +#[cfg(all(target_os = "linux", target_env = "gnu", not(target_arch = "s390x")))] const PROC_SUPER_MAGIC: libc::c_long = 0x00009fa0; #[cfg(all(target_os = "linux", target_env = "musl"))] const PROC_SUPER_MAGIC: libc::c_ulong = 0x00009fa0; +#[cfg(all(target_os = "linux", target_env = "gnu", target_arch = "s390x"))] +const PROC_SUPER_MAGIC: libc::c_uint = 0x00009fa0; lazy_static! { static ref PROPAGATION: HashMap<&'static str, MsFlags> = {