1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 12:15:32 +03:00
aports/community/psmisc/musl_ptregs.patch
Breno Leitao 0c36e883cf community/psmisc: Fix FTBFS on ppc64le
There is an issue with psmisc that fails to build due to names clash.
This is the type of the problem this patch is resolving:

  In file included from /usr/include/sys/user.h:11:0,
                   from peekfd.c:33:
  /usr/include/bits/user.h:1:8: error: redefinition of 'struct pt_regs'
   struct pt_regs {
          ^~~~~~~
  In file included from peekfd.c:30:0:
  /usr/include/asm/ptrace.h:31:8: note: originally defined here
   struct pt_regs {
          ^~~~~~~
2017-04-12 20:00:52 +00:00

20 lines
487 B
Diff

Author: Breno Leitao <brenohl@br.ibm.com>
Date: Thu Apr 6 14:03:00 2017 -0300
peekfd: Avoid pt_regs clash
Index: psmisc-22.21/src/peekfd.c
===================================================================
--- a/src/peekfd.c.old
+++ b/src/peekfd.c
@@ -27,7 +27,9 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/syscall.h>
+#define pt_regs uapi_pt_regs
#include <asm/ptrace.h>
+#undef pt_regs
#include <byteswap.h>
#include <endian.h>
#include <sys/user.h>