summaryrefslogtreecommitdiff
path: root/portability
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2021-12-29 11:15:12 -0600
committerTimo Teräs <timo.teras@iki.fi>2021-12-29 20:14:41 +0200
commit837d2fd915739e50bffb2c5f5c35d422b7fe8ac8 (patch)
tree13ffbc209d1400cad8f2f81e5d82c533b1ed313d /portability
parente6b1b2902824a4adca313503280563ee7114c6c8 (diff)
downloadapk-tools-837d2fd915739e50bffb2c5f5c35d422b7fe8ac8.tar.gz
apk-tools-837d2fd915739e50bffb2c5f5c35d422b7fe8ac8.tar.bz2
apk-tools-837d2fd915739e50bffb2c5f5c35d422b7fe8ac8.tar.xz
apk-tools-837d2fd915739e50bffb2c5f5c35d422b7fe8ac8.zip
portability: include environ in overlaid unistd.h
Diffstat (limited to 'portability')
-rw-r--r--portability/unistd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/portability/unistd.h b/portability/unistd.h
index 4d0cef8..f87ff71 100644
--- a/portability/unistd.h
+++ b/portability/unistd.h
@@ -3,3 +3,8 @@
#ifdef NEED_PIPE2
int pipe2(int pipefd[2], int flags);
#endif
+
+#ifdef __APPLE__
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
+#endif