add if guards around include <malloc.h>
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 5 Dec 2010 00:30:14 +0000 (01:30 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 5 Dec 2010 00:30:14 +0000 (01:30 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/appletlib.c
shell/hush.c

index efd7a5a818b37f77c151beb7f4cb3d649d205b8f..3e32fa1efdece46be7d29ad5d84668b3f7666494 100644 (file)
  */
 #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>
index 584af9e064b70398bb6471f362fcf48bba71c2ec..087636b6d5deeeeb33ff8d31722f71d97282d5c2 100644 (file)
  *              aaa
  */
 #include "busybox.h"  /* for APPLET_IS_NOFORK/NOEXEC */
-#include <malloc.h>   /* for malloc_trim */
+#if !(defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \
+       || defined(__APPLE__) \
+    )
+# include <malloc.h>   /* for malloc_trim */
+#endif
 #include <glob.h>
 /* #include <dmalloc.h> */
 #if ENABLE_HUSH_CASE