diff options
author | Kevin Buettner <kevinb@redhat.com> | 2021-02-18 22:46:58 -0700 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2021-02-18 22:56:56 -0700 |
commit | 8488c357ce4fc309d49c7b0224cf9574b68e8116 (patch) | |
tree | 17b7494fca6433681c074452e7c3b0d8c286b15e /gdb/ChangeLog | |
parent | 5a9f5403c75c8ae1f4935a9a0904949f52d9e3aa (diff) | |
download | gdb-8488c357ce4fc309d49c7b0224cf9574b68e8116.zip gdb-8488c357ce4fc309d49c7b0224cf9574b68e8116.tar.gz gdb-8488c357ce4fc309d49c7b0224cf9574b68e8116.tar.bz2 |
amd64-linux-siginfo.c: Adjust include order to avoid gnulib error
On Fedora rawhide, after updating to glibc-2.33, I'm seeing the
following build failure:
CXX nat/amd64-linux-siginfo.o
In file included from /usr/include/bits/sigstksz.h:24,
from /usr/include/signal.h:315,
from ../gnulib/import/signal.h:52,
from /ironwood1/sourceware-git/rawhide-gnulib/bld/../../worktree-gnulib/gdbserver/../gdb/nat/amd64-linux-siginfo.c:20:
../gnulib/import/unistd.h:663:3: error: #error "Please include config.h first."
663 | #error "Please include config.h first."
| ^~~~~
glibc-2.33 has changed signal.h to now include <bits/sigstksz.h> which,
in turn, includes <unistd.h>. For a gdb build, this causes the gnulib
version of unistd.h to be pulled in first. The build failure shown
above happens because gnulib's config.h has not been included before
the include of <signal.h>.
The fix is simple - we just rearrange the order of the header file
includes to make sure that gdbsupport/commondefs.h is included before
attempting to include signal.h. Note that gdbsupport/commondefs.h
includes <gnulib/config.h>.
Build and regression tested on Fedora 33. On Fedora rawhide, GDB
builds again.
gdb/ChangeLog:
* nat/amd64-linux-siginfo.c: Include "gdbsupport/common-defs.h"
(which in turn includes <gnulib/config.h>) before include
of <signal.h>.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f608d9e..beee613 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2021-02-19 Kevin Buettner <kevinb@redhat.com> + + * nat/amd64-linux-siginfo.c: Include "gdbsupport/common-defs.h" + (which in turn includes <gnulib/config.h>) before include + of <signal.h>. + 2021-02-19 Nelson Chu <nelson.chu@sifive.com> PR 27158 |