aboutsummaryrefslogtreecommitdiffstats
path: root/main/psmisc/include_limits.patch
blob: 1b474bc8f6045b3a49c6744214ac706b5b5c0978 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Author: Breno Leitao <brenohl@br.ibm.com>
Date:   Thu Apr 6 13:59:57 2017 -0300

    peekfd: Include headers for ppc64
    
    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.

Index: psmisc-22.21/src/peekfd.c
===================================================================
--- psmisc-22.21.orig/src/peekfd.c
+++ psmisc-22.21/src/peekfd.c
@@ -37,6 +37,14 @@
 
 #include "i18n.h"
 
+#if !defined(PATH_MAX)
+#include <limits.h>
+#endif
+
+#if !defined(__WORDSIZE)
+#include <bits/reg.h>
+#endif
+
 #ifdef I386
 	#define REG_ORIG_ACCUM orig_eax
 	#define REG_ACCUM eax
Index: psmisc-22.21/src/pstree.c
===================================================================
--- psmisc-22.21.orig/src/pstree.c
+++ psmisc-22.21/src/pstree.c
@@ -45,6 +45,10 @@
 #include "i18n.h"
 #include "comm.h"
 
+#if !defined(PATH_MAX)
+#include <limits.h>
+#endif
+
 #ifdef WITH_SELINUX
 #include <selinux/selinux.h>
 #else