diff mbox

libgo patch committed: Ignore ptrace_pseeksiginfo_args from <linux/ptrace.h>

Message ID CAOyqgcULJZ-S23b2o9zQ3mJnNe7ArWJQv+sRfG55EQCYqTd-nA@mail.gmail.com
State New
Headers show

Commit Message

Ian Lance Taylor July 18, 2017, 10:06 p.m. UTC
This patch should fix PR 81324 filed against libgo.  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.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.

Ian
diff mbox

Patch

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 250217)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@ 
-2ae6bf76f97f7d4c63a1f0ad0683b9ba62baaf06
+21775ae119830810d9e415a02e85349f4190c68c
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/sysinfo.c
===================================================================
--- libgo/sysinfo.c	(revision 249799)
+++ libgo/sysinfo.c	(working copy)
@@ -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>