Browse Source

libcap: fix build on non-linux systems

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Felix Fietkau 9 years ago
parent
commit
4e7545ff68
1 changed files with 19 additions and 0 deletions
  1. 19
    0
      libs/libcap/patches/100-portability.patch

+ 19
- 0
libs/libcap/patches/100-portability.patch View File

@@ -0,0 +1,19 @@
1
+--- a/libcap/_makenames.c
2
++++ b/libcap/_makenames.c
3
+@@ -7,7 +7,6 @@
4
+ 
5
+ #include <stdio.h>
6
+ #include <stdlib.h>
7
+-#include <sys/capability.h>
8
+ 
9
+ /*
10
+  * #include 'sed' generated array
11
+@@ -22,7 +21,7 @@ struct {
12
+ };
13
+ 
14
+ /* this should be more than big enough (factor of three at least) */
15
+-const char *pointers[8*sizeof(struct __user_cap_data_struct)];
16
++const char *pointers[8*12];
17
+ 
18
+ int main(void)
19
+ {