aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-12-05 01:30:14 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-12-05 01:30:14 +0100
commit8da415ef2503936bc9730f78a25b00177ff2db1d (patch)
treea58ed5ab38868fba80ccdea9fe8ee192fa5d9851 /libbb
parent5dcc6606cb6ef41e0e0b0f828f670cc61311a3f7 (diff)
downloadbusybox-8da415ef2503936bc9730f78a25b00177ff2db1d.tar.gz
add if guards around include <malloc.h>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/appletlib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index efd7a5a81..3e32fa1ef 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -28,7 +28,11 @@
*/
#include "busybox.h"
#include <assert.h>
-#include <malloc.h>
+#if !(defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \
+ || defined(__APPLE__) \
+ )
+# include <malloc.h> /* for mallopt */
+#endif
/* Try to pull in PAGE_SIZE */
#ifdef __linux__
# include <sys/user.h>