psmisc: make musl patch __GLIBC__ safe

Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
Jürgen Buchmüller 2019-01-11 16:36:35 +01:00
parent 9380a30987
commit f90abed201
No known key found for this signature in database
GPG key ID: 6764EC32352D0647

View file

@ -7,13 +7,17 @@ Index: psmisc-22.21/src/peekfd.c
=================================================================== ===================================================================
--- src/peekfd.c.old --- src/peekfd.c.old
+++ src/peekfd.c +++ src/peekfd.c
@@ -27,7 +27,9 @@ @@ -27,7 +27,13 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/syscall.h> #include <sys/syscall.h>
+#if !defined(__GLIBC__)
+#define pt_regs uapi_pt_regs +#define pt_regs uapi_pt_regs
+#endif
#include <asm/ptrace.h> #include <asm/ptrace.h>
+#if !defined(__GLIBC__)
+#undef pt_regs +#undef pt_regs
+#endif
#include <byteswap.h> #include <byteswap.h>
#include <endian.h> #include <endian.h>
#include <sys/user.h> #include <sys/user.h>