]> granicus.if.org Git - psmisc/commitdiff
peekfd: Include headers for ppc64
authorBreno Leitao <brenohl@br.ibm.com>
Thu, 6 Apr 2017 16:59:57 +0000 (13:59 -0300)
committerCraig Small <csmall@enc.com.au>
Sat, 5 May 2018 22:11:25 +0000 (08:11 +1000)
Currently peekfd fails to build on ppc64le architecture with musl
because it does not find reference for __WORDSIZE.

This patch just includes reference for this macro if it was not
previously defined.

src/peekfd.c

index 32723b594470d9591891636ef6c7879f5c635212..46f52a2ee885c06965e559c63856f3d17d6f1685 100644 (file)
        #define REG_PARAM2 rsi
        #define REG_PARAM3 rdx
 #elif PPC
+       #if !defined(__WORDSIZE)
+       #include <bits/reg.h>
+       #endif
+
        #define REG_ORIG_ACCUM gpr[0]
        #define REG_ACCUM gpr[3]
        #define REG_PARAM1 orig_gpr3