This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] IPA: Fix build problem on !HAVE_GETAUXVAL
- From: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- To: uweigand at de dot ibm dot com
- Cc: gdb-patches at sourceware dot org, Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- Date: Sun, 3 Apr 2016 14:31:15 +0200
- Subject: [PATCH] IPA: Fix build problem on !HAVE_GETAUXVAL
- Authentication-results: sourceware.org; auth=none
- References: <20160401144346 dot 44B5DCA06 at oc7340732750 dot ibm dot com>
These files need AT_PHDR, which is defined in elf.h. If HAVE_GETAUXVAL
is set, it's implicitely included by sys/auxv.h. Include it manually
for the opposite case.
gdb/gdbserver/ChangeLog:
* linux-aarch64-ipa.c: Add <elf.h> include.
* linux-ppc-ipa.c: Add <elf.h> include.
* linux-s390-ipa.c: Add <elf.h> include.
---
Here's a fix. Does that sound right?
gdb/gdbserver/linux-aarch64-ipa.c | 1 +
gdb/gdbserver/linux-ppc-ipa.c | 1 +
gdb/gdbserver/linux-s390-ipa.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/gdb/gdbserver/linux-aarch64-ipa.c b/gdb/gdbserver/linux-aarch64-ipa.c
index 50caeae..601d61c 100644
--- a/gdb/gdbserver/linux-aarch64-ipa.c
+++ b/gdb/gdbserver/linux-aarch64-ipa.c
@@ -21,6 +21,7 @@
#include "server.h"
#include <sys/mman.h>
#include "tracepoint.h"
+#include <elf.h>
#ifdef HAVE_GETAUXVAL
#include <sys/auxv.h>
#endif
diff --git a/gdb/gdbserver/linux-ppc-ipa.c b/gdb/gdbserver/linux-ppc-ipa.c
index 8489c6e..d8f118e 100644
--- a/gdb/gdbserver/linux-ppc-ipa.c
+++ b/gdb/gdbserver/linux-ppc-ipa.c
@@ -22,6 +22,7 @@
#include <sys/mman.h>
#include "tracepoint.h"
#include "linux-ppc-tdesc.h"
+#include <elf.h>
#ifdef HAVE_GETAUXVAL
#include <sys/auxv.h>
#endif
diff --git a/gdb/gdbserver/linux-s390-ipa.c b/gdb/gdbserver/linux-s390-ipa.c
index a9f86ad..cdf2fe7 100644
--- a/gdb/gdbserver/linux-s390-ipa.c
+++ b/gdb/gdbserver/linux-s390-ipa.c
@@ -22,6 +22,7 @@
#include <sys/mman.h>
#include "tracepoint.h"
#include "linux-s390-tdesc.h"
+#include <elf.h>
#ifdef HAVE_GETAUXVAL
#include <sys/auxv.h>
#endif
--
2.8.0