diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2025-01-06 16:24:14 +0100 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2025-01-06 16:24:14 +0100 |
commit | d7bd319e93a3ab73d7e88ef44550f0be98c6c4b7 (patch) | |
tree | 53658ad8317604a0f5321414a6e0ff0e73d5e8e9 | |
parent | 9d02cb7fe0d636be390e43e06f39b30b834e89e4 (diff) | |
download | gdb-d7bd319e93a3ab73d7e88ef44550f0be98c6c4b7.zip gdb-d7bd319e93a3ab73d7e88ef44550f0be98c6c4b7.tar.gz gdb-d7bd319e93a3ab73d7e88ef44550f0be98c6c4b7.tar.bz2 |
Fix procfs.c compilation
procfs.c compilation is currently broken on Solaris:
/vol/src/gnu/gdb/hg/gdb-16-branch/git/gdb/procfs.c: In member function ‘virtual ptid_t procfs_target::wait(ptid_t, target_waitstatus*, target_wait_flags)’:
/vol/src/gnu/gdb/hg/gdb-16-branch/git/gdb/procfs.c:2067:34: error: ‘wait’ is not a member of ‘gdb’; did you mean ‘wait’?
2067 | wait_retval = gdb::wait (&wstat);
| ^~~~
In file included from ../gnulib/import/sys/wait.h:28,
from /usr/include/stdlib.h:16,
from /usr/gcc/14/include/c++/14.2.0/cstdlib:79,
from /vol/src/gnu/gdb/hg/gdb-16-branch/git/gdb/../gdbsupport/common-defs.h:99,
from /vol/src/gnu/gdb/hg/gdb-16-branch/git/gdb/defs.h:26,
from <command-line>:
/usr/include/sys/wait.h:85:14: note: ‘wait’ declared here
85 | extern pid_t wait(int *);
| ^~~~
/vol/src/gnu/gdb/hg/gdb-16-branch/git/gdb/procfs.c:2154:41: error: ‘wait’ is not a member of ‘gdb’; did you mean ‘wait’?
2154 | int temp = gdb::wait (&wstat);
| ^~~~
/usr/include/sys/wait.h:85:14: note: ‘wait’ declared here
85 | extern pid_t wait(int *);
| ^~~~
/vol/src/gnu/gdb/hg/gdb-16-branch/git/gdb/procfs.c: In function ‘void unconditionally_kill_inferior(procinfo*)’:
/vol/src/gnu/gdb/hg/gdb-16-branch/git/gdb/procfs.c:2566:12: error: ‘wait’ is not a member of ‘gdb’; did you mean ‘wait’?
2566 | gdb::wait (NULL);
| ^~~~
/usr/include/sys/wait.h:85:14: note: ‘wait’ declared here
85 | extern pid_t wait(int *);
| ^~~~
The use of gdb::wait was introduced in
commit 4e4dfc4728622d83c5d600949024449e21de868a
Author: Tom de Vries <tdevries@suse.de>
Date: Fri Nov 22 17:44:29 2024 +0100
[gdb] Add gdb::wait
but obviously never tested.
Fixed by including gdbsupport/eintr.h to provide the declaration.
Tested on amd64-pc-solaris2.11 and sparcv9-sun-solaris2.11.
-rw-r--r-- | gdb/procfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c index d5177f3..be95a35 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -46,6 +46,7 @@ #include "gdbsupport/scoped_fd.h" #include "gdbsupport/pathstuff.h" #include "gdbsupport/buildargv.h" +#include "gdbsupport/eintr.h" #include "cli/cli-style.h" /* This module provides the interface between GDB and the |