From 1432201e2f9be490b666f8d78d858f067fd72f5a Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 13 Jul 2025 17:17:23 +0100 Subject: [PATCH] ptrace first argument with unsigned int is only for uclibc/Linux glibc. Fix #2641 --- changelog/2648.fixed.md | 1 + src/sys/ptrace/linux.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog/2648.fixed.md diff --git a/changelog/2648.fixed.md b/changelog/2648.fixed.md new file mode 100644 index 0000000000..69f2f903ea --- /dev/null +++ b/changelog/2648.fixed.md @@ -0,0 +1 @@ +ptrace for Linux fix first argument type (u32 to i32) for s390x/musl diff --git a/src/sys/ptrace/linux.rs b/src/sys/ptrace/linux.rs index 8c1a46ba8d..0490988786 100644 --- a/src/sys/ptrace/linux.rs +++ b/src/sys/ptrace/linux.rs @@ -24,7 +24,7 @@ pub type AddressType = *mut ::libc::c_void; use libc::user_regs_struct; cfg_if! { - if #[cfg(any(all(target_os = "linux", target_arch = "s390x"), + if #[cfg(any( all(target_os = "linux", target_env = "gnu"), target_env = "uclibc"))] { #[doc(hidden)]