diff --git a/gio/tests/gsubprocess.c b/gio/tests/gsubprocess.c index 1a0d6df34..5baff93a4 100644 --- a/gio/tests/gsubprocess.c +++ b/gio/tests/gsubprocess.c @@ -2006,7 +2006,7 @@ 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 +#ifdef HAVE_PTRACE_O_EXITKILL PTRACE_O_EXITKILL | #endif PTRACE_O_TRACEVFORK | diff --git a/meson.build b/meson.build index 6cab237d2..d875346b4 100644 --- a/meson.build +++ b/meson.build @@ -2440,6 +2440,10 @@ with open(output, "w") as f: enable_dtrace = true endif +if cc.has_header_symbol('sys/ptrace.h', 'PTRACE_O_EXITKILL') + glib_conf.set('HAVE_PTRACE_O_EXITKILL', 1) +endif + # systemtap want_systemtap = get_option('systemtap') enable_systemtap = false