mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06:14 +01:00
meson: Improve PTRACE_O_EXITKILL presence check
The PTRACE_O_EXITKILL symbol in sys/ptrace.h is an enum member, not a macro. The #ifdef check added to the GSubprocess test-case in272ec5dbca
will not detect it. Use cc.has_header_symbol() to properly detect it. According to the documentation: "Symbols here include function, variable, #define, type definition, etc.". Fixes:272ec5dbca
Closes: https://gitlab.gnome.org/GNOME/glib/-/issues/3156
This commit is contained in:
parent
58cce38f37
commit
168de73a73
@ -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 |
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user