summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-10-04 15:32:55 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-10-04 15:43:37 +0200
commitf558b547157e52b27168c691948cd59eaca70140 (patch)
tree66dc10d779b2e2c134550a8cdccb8e318f29d577
parentef06b4d6de2b04c8d09f7962acfa4cd125a3a47f (diff)
downloaduhttpd-f558b547157e52b27168c691948cd59eaca70140.tar.gz
provide a clearenv() fallback for mac os x
-rw-r--r--uhttpd-utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/uhttpd-utils.h b/uhttpd-utils.h
index 9de9191..309e93e 100644
--- a/uhttpd-utils.h
+++ b/uhttpd-utils.h
@@ -25,6 +25,13 @@
#include <libubox/uloop.h>
+#ifdef __APPLE__
+static inline void clearenv(void)
+{
+ extern char **environ;
+ environ = NULL;
+}
+#endif
#ifdef HAVE_SHADOW
#include <shadow.h>