busybox: fix build on FreeBSD 10.1
[openwrt/openwrt.git] / package / utils / busybox / patches / 102-freebsd-compat.patch
1 --- a/scripts/basic/docproc.c
2 +++ b/scripts/basic/docproc.c
3 @@ -39,7 +39,10 @@
4 #include <limits.h>
5 #include <sys/types.h>
6 #include <sys/wait.h>
7 +
8 +#ifndef __FreeBSD__
9 #include <alloca.h>
10 +#endif
11
12 /* exitstatus is used to keep track of any failing calls to kernel-doc,
13 * but execution continues. */
14 --- a/scripts/basic/fixdep.c
15 +++ b/scripts/basic/fixdep.c
16 @@ -113,7 +113,10 @@
17 #include <limits.h>
18 #include <ctype.h>
19 #include <arpa/inet.h>
20 +
21 +#ifndef __FreeBSD__
22 #include <alloca.h>
23 +#endif
24
25 /* bbox: not needed
26 #define INT_CONF ntohl(0x434f4e46)