Merge branch 'wip/abono/ptrace-o-exitkill-check' into 'main'

meson: Improve PTRACE_O_EXITKILL presence check

Closes #3156

See merge request GNOME/glib!3669
This commit is contained in:
Emmanuele Bassi 2023-10-26 10:23:04 +00:00
commit a1664c3fa3
2 changed files with 5 additions and 1 deletions

View File

@ -2006,7 +2006,7 @@ trace_children (pid_t main_child)
g_assert_no_errno (waitpid (main_child, &wstatus, 0)); g_assert_no_errno (waitpid (main_child, &wstatus, 0));
g_assert_no_errno (ptrace (PTRACE_SETOPTIONS, main_child, NULL, g_assert_no_errno (ptrace (PTRACE_SETOPTIONS, main_child, NULL,
(PTRACE_O_TRACEFORK | (PTRACE_O_TRACEFORK |
#ifdef PTRACE_O_EXITKILL #ifdef HAVE_PTRACE_O_EXITKILL
PTRACE_O_EXITKILL | PTRACE_O_EXITKILL |
#endif #endif
PTRACE_O_TRACEVFORK | PTRACE_O_TRACEVFORK |

View File

@ -2440,6 +2440,10 @@ with open(output, "w") as f:
enable_dtrace = true enable_dtrace = true
endif endif
if cc.has_header_symbol('sys/ptrace.h', 'PTRACE_O_EXITKILL')
glib_conf.set('HAVE_PTRACE_O_EXITKILL', 1)
endif
# systemtap # systemtap
want_systemtap = get_option('systemtap') want_systemtap = get_option('systemtap')
enable_systemtap = false enable_systemtap = false