aboutsummaryrefslogtreecommitdiff
path: root/libgo/sysinfo.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-07-18 22:06:31 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-07-18 22:06:31 +0000
commiteb80664a39e8bb876bfc6b9ef7ad8578e3c76fa4 (patch)
tree0df24cb25c6a797d5a85bf2316ab66a1840069da /libgo/sysinfo.c
parent7a795e10c0619e20148b08a90cf0904e954cb37c (diff)
downloadgcc-eb80664a39e8bb876bfc6b9ef7ad8578e3c76fa4.zip
gcc-eb80664a39e8bb876bfc6b9ef7ad8578e3c76fa4.tar.gz
gcc-eb80664a39e8bb876bfc6b9ef7ad8578e3c76fa4.tar.bz2
re PR go/81324 (libgo does not build with glibc 2.18)
PR go/81324 sysinfo.c: ignore ptrace_peeksiginfo_args from <linux/ptrace.h> With some versions of glibc and GNU/Linux ptrace_pseeksiginfo_args is defined in both <sys/ptrace.h> and <linux/ptrace.h>. We don't actually care about the struct, so use a #define to avoid a redefinition error. This fixes https://gcc.gnu.org/PR81324. Reviewed-on: https://go-review.googlesource.com/49290 From-SVN: r250324
Diffstat (limited to 'libgo/sysinfo.c')
-rw-r--r--libgo/sysinfo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
index 1ba27b1..884d017 100644
--- a/libgo/sysinfo.c
+++ b/libgo/sysinfo.c
@@ -106,9 +106,13 @@
/* Avoid https://sourceware.org/bugzilla/show_bug.cgi?id=762 . */
#define ia64_fpreg pt_ia64_fpreg
#define pt_all_user_regs pt_ia64_all_user_regs
+/* Avoid redefinition of ptrace_peeksiginfo from <sys/ptrace.h>.
+ https://gcc.gnu.org/PR81324 . */
+#define ptrace_peeksiginfo_args ignore_ptrace_peeksiginfo_args
#include <linux/ptrace.h>
#undef ia64_fpreg
#undef pt_all_user_regs
+#undef ptrace_peeksiginfo_args
#endif
#if defined(HAVE_LINUX_RTNETLINK_H)
#include <linux/rtnetlink.h>