From 272ec5dbca8ec957ced2cdca45bde69f47fb4df9 Mon Sep 17 00:00:00 2001 From: Alessandro Bono Date: Tue, 19 Sep 2023 12:24:09 +0200 Subject: [PATCH] tests/gsubprocess: Don't rely on PTRACE_O_EXITKILL presence The PTRACE_O_EXITKILL symbol was introduced in glibc 2.23. CentOS7 has glibc 2.17. Use the symbol only if it is defined. --- gio/tests/gsubprocess.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gio/tests/gsubprocess.c b/gio/tests/gsubprocess.c index 45fdf93b2..1a0d6df34 100644 --- a/gio/tests/gsubprocess.c +++ b/gio/tests/gsubprocess.c @@ -2006,7 +2006,9 @@ trace_children (pid_t main_child) g_assert_no_errno (waitpid (main_child, &wstatus, 0)); g_assert_no_errno (ptrace (PTRACE_SETOPTIONS, main_child, NULL, (PTRACE_O_TRACEFORK | +#ifdef PTRACE_O_EXITKILL PTRACE_O_EXITKILL | +#endif PTRACE_O_TRACEVFORK | PTRACE_O_TRACECLONE | PTRACE_O_TRACEEXEC)));