From eb80664a39e8bb876bfc6b9ef7ad8578e3c76fa4 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 18 Jul 2017 22:06:31 +0000 Subject: [PATCH] re PR go/81324 (libgo does not build with glibc 2.18) PR go/81324 sysinfo.c: ignore ptrace_peeksiginfo_args from With some versions of glibc and GNU/Linux ptrace_pseeksiginfo_args is defined in both and . 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 --- gcc/go/gofrontend/MERGE | 2 +- libgo/sysinfo.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 524aca72fd7..06a8731d06f 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -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. diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c index 1ba27b1a093..884d01716b8 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 . + https://gcc.gnu.org/PR81324 . */ +#define ptrace_peeksiginfo_args ignore_ptrace_peeksiginfo_args #include #undef ia64_fpreg #undef pt_all_user_regs +#undef ptrace_peeksiginfo_args #endif #if defined(HAVE_LINUX_RTNETLINK_H) #include