From f23336fbc3148105c42eebfa44a22d1164828108 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sun, 8 May 2022 19:33:57 -0400 Subject: use either environ or __stdlib.environ, never both --- src/stdlib/_stdlib.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/stdlib/_stdlib.h') 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 -- cgit v1.2.1