about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2021-02-15 13:10:03 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2021-02-15 13:42:01 +0000
commitfb1905eed8535d9ea4518df82b823544de37f7d8 (patch)
tree0ed228e6846e0ca6f378f1f08d991616919f6a12
parentebcf45a16ca981c8515f88db94e757cfc6fe4b35 (diff)
downloadglibc-fb1905eed8535d9ea4518df82b823544de37f7d8.tar.gz
glibc-fb1905eed8535d9ea4518df82b823544de37f7d8.tar.xz
glibc-fb1905eed8535d9ea4518df82b823544de37f7d8.zip
aarch64: Fix sys/ptrace.h if linux headers are included
If the linux asm/ptrace.h is included before sys/ptrace.h that
breaks the newly added declarations there, so undef the names
that may be defined as macros in the linux header.
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h b/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
index de26da0023..af8193cbe7 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
@@ -25,6 +25,40 @@
 
 __BEGIN_DECLS
 
+/* Avoid collision if the linux ptrace header is already included.  */
+#undef PTRACE_TRACEME
+#undef PTRACE_PEEKTEXT
+#undef PTRACE_PEEKDATA
+#undef PTRACE_PEEKUSER
+#undef PTRACE_POKETEXT
+#undef PTRACE_POKEDATA
+#undef PTRACE_POKEUSER
+#undef PTRACE_CONT
+#undef PTRACE_KILL
+#undef PTRACE_SINGLESTEP
+#undef PTRACE_ATTACH
+#undef PTRACE_DETACH
+#undef PTRACE_SYSCALL
+#undef PTRACE_SYSEMU
+#undef PTRACE_SYSEMU_SINGLESTEP
+#undef PTRACE_PEEKMTETAGS
+#undef PTRACE_POKEMTETAGS
+#undef PTRACE_SETOPTIONS
+#undef PTRACE_GETEVENTMSG
+#undef PTRACE_GETSIGINFO
+#undef PTRACE_SETSIGINFO
+#undef PTRACE_GETREGSET
+#undef PTRACE_SETREGSET
+#undef PTRACE_SEIZE
+#undef PTRACE_INTERRUPT
+#undef PTRACE_LISTEN
+#undef PTRACE_PEEKSIGINFO
+#undef PTRACE_GETSIGMASK
+#undef PTRACE_SETSIGMASK
+#undef PTRACE_SECCOMP_GET_FILTER
+#undef PTRACE_SECCOMP_GET_METADATA
+#undef PTRACE_GET_SYSCALL_INFO
+
 /* Type of the REQUEST argument to `ptrace.'  */
 enum __ptrace_request
 {