diff mbox

[OBV] gdbserver: Ensure AT_HWCAP2 is defined

Message ID 20190328114337.67043-1-alan.hayward@arm.com
State New
Headers show

Commit Message

Alan Hayward March 28, 2019, 11:43 a.m. UTC
When using older compilers, AT_HWCAP2 may not be be defined.
It is defined in elf/common.h, however including this in
gdbserver/linux-low.c causes conflicts.

Manually add the define if it does not exist.


2019-03-28  Alan Hayward  <alan.hayward@arm.com>

	* linux-low.c (AT_HWCAP2): Add define if not already included.
 gdb/gdbserver/linux-low.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox


diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 7158a6798c..265043f97e 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -75,6 +75,10 @@ 
 #define O_LARGEFILE 0
+#ifndef AT_HWCAP2
+#define AT_HWCAP2 26
 /* Some targets did not define these ptrace constants from the start,
    so gdbserver defines them locally here.  In the future, these may
    be removed after they are added to asm/ptrace.h.  */