From e999fb45a518970e934c78a9a9017fe537d03846 Mon Sep 17 00:00:00 2001 From: Avinash Pydimarri Date: Wed, 19 Jun 2019 03:29:49 -0700 Subject: [PATCH] changes made to solve __environ error Signed-off-by: Avinash Pydimarri --- port/unix/auxv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/port/unix/auxv.c b/port/unix/auxv.c index a6043899cf..ea8ecac816 100644 --- a/port/unix/auxv.c +++ b/port/unix/auxv.c @@ -24,6 +24,7 @@ * suffer the consequences if you're an ingenious fool and dlopen this library * after you've moved the env via a call to setenv! Just don't do it. */ +#define _GNU_SOURCE #include #include #include @@ -45,7 +46,7 @@ static char **saved_environ = NULL; void __attribute__ ((__constructor__)) __attribute__ ((__visibility__ ("hidden"))) libauxv_init (void) { - saved_environ = __environ; + saved_environ = environ; } /* Scan to the end of the saved environ to find the aux vector. */