summaryrefslogtreecommitdiff
path: root/src/stdlib/_stdlib.h
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2022-05-08 19:33:57 -0400
committerJakob Kaivo <jkk@ung.org>2022-05-08 19:33:57 -0400
commitf23336fbc3148105c42eebfa44a22d1164828108 (patch)
tree14459cc9eb7004ec9d0188a2536de4696b892cf2 /src/stdlib/_stdlib.h
parentbe3d8140a0a1c3a1b4ec7b2ca2e931d7f0ef47fd (diff)
use either environ or __stdlib.environ, never both
Diffstat (limited to 'src/stdlib/_stdlib.h')
-rw-r--r--src/stdlib/_stdlib.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stdlib/_stdlib.h b/src/stdlib/_stdlib.h
index 089de7df..929981a6 100644
--- a/src/stdlib/_stdlib.h
+++ b/src/stdlib/_stdlib.h
@@ -20,4 +20,10 @@ struct __stdlib {
extern struct __stdlib __stdlib;
+#ifdef _POSIX_SOURCE
+extern char **environ;
+#else
+#define environ __stdlib.environ
+#endif
+
#endif