From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7814) id 728243857C7E; Fri, 27 Aug 2021 23:27:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 728243857C7E Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Fangrui Song To: glibc-cvs@sourceware.org Subject: [glibc/maskray/grte] powerpc: Undefine Linux ptrace macros that conflict with __ptrace_request X-Act-Checkin: glibc X-Git-Author: Tulio Magno Quites Machado Filho X-Git-Refname: refs/heads/maskray/grte X-Git-Oldrev: 3e6bbf417e4527d230d47a5c946f70b61b6a20f7 X-Git-Newrev: 3d67bc8070d3ad7b201b3424053af210b8e22c82 Message-Id: <20210827232724.728243857C7E@sourceware.org> Date: Fri, 27 Aug 2021 23:27:24 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2021 23:27:24 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3d67bc8070d3ad7b201b3424053af210b8e22c82 commit 3d67bc8070d3ad7b201b3424053af210b8e22c82 Author: Tulio Magno Quites Machado Filho Date: Mon Feb 26 10:40:17 2018 -0300 powerpc: Undefine Linux ptrace macros that conflict with __ptrace_request Linux ptrace headers define macros whose tokens conflict with the constants of enum __ptrace_request causing build errors when asm/ptrace.h or linux/ptrace.h are included before sys/ptrace.h. * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Undefine Linux macros used in __ptrace_request. Signed-off-by: Tulio Magno Quites Machado Filho (cherry picked from commit 398c6fddafcee2dc4c2b2574417a2d0cfccaeec1) Diff: --- ChangeLog | 5 ++++ sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h | 43 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8d05fbeab5..6ae33c2dbf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-02-26 Tulio Magno Quites Machado Filho + + * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Undefine Linux + macros used in __ptrace_request. + 2018-02-21 Mike FABIAN [BZ #22517] diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h index 75567b2bad..1c68895159 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h @@ -24,6 +24,49 @@ __BEGIN_DECLS +#if defined _LINUX_PTRACE_H || defined _ASM_POWERPC_PTRACE_H +/* Do not let Linux headers macros interfere with enum __ptrace_request. */ +# undef PTRACE_ATTACH +# undef PTRACE_CONT +# undef PTRACE_DETACH +# undef PTRACE_GET_DEBUGREG +# undef PTRACE_GETEVENTMSG +# undef PTRACE_GETEVRREGS +# undef PTRACE_GETFPREGS +# undef PTRACE_GETREGS +# undef PTRACE_GETREGS64 +# undef PTRACE_GETREGSET +# undef PTRACE_GETSIGINFO +# undef PTRACE_GETSIGMASK +# undef PTRACE_GETVRREGS +# undef PTRACE_GETVSRREGS +# undef PTRACE_INTERRUPT +# undef PTRACE_KILL +# undef PTRACE_LISTEN +# undef PTRACE_PEEKDATA +# undef PTRACE_PEEKSIGINFO +# undef PTRACE_PEEKTEXT +# undef PTRACE_POKEDATA +# undef PTRACE_POKETEXT +# undef PTRACE_SECCOMP_GET_FILTER +# undef PTRACE_SEIZE +# undef PTRACE_SET_DEBUGREG +# undef PTRACE_SETEVRREGS +# undef PTRACE_SETFPREGS +# undef PTRACE_SETOPTIONS +# undef PTRACE_SETREGS +# undef PTRACE_SETREGS64 +# undef PTRACE_SETREGSET +# undef PTRACE_SETSIGINFO +# undef PTRACE_SETSIGMASK +# undef PTRACE_SETVRREGS +# undef PTRACE_SETVSRREGS +# undef PTRACE_SINGLEBLOCK +# undef PTRACE_SINGLESTEP +# undef PTRACE_SYSCALL +# undef PTRACE_TRACEME +#endif + /* Type of the REQUEST argument to `ptrace.' */ enum __ptrace_request {