Loading...
stdlib/FreeBSD/getenv.c.patch /dev/null Libc-391.4.1
--- /dev/null
+++ Libc/Libc-391.4.1/stdlib/FreeBSD/getenv.c.patch
@@ -0,0 +1,22 @@
+--- getenv.c.orig	2004-12-01 20:08:48.000000000 -0800
++++ getenv.c	2004-12-01 20:10:20.000000000 -0800
+@@ -40,8 +40,9 @@
+ #include <stdlib.h>
+ #include <stddef.h>
+ #include <string.h>
++#include <crt_externs.h>
+ 
+-inline char *__findenv(const char *, int *);
++inline char *__findenv(const char *, int *) __attribute__((always_inline));
+ 
+ /*
+  * __findenv --
+@@ -57,7 +58,7 @@
+ 	const char *name;
+ 	int *offset;
+ {
+-	extern char **environ;
++	char **environ = *_NSGetEnviron();
+ 	int len, i;
+ 	const char *np;
+ 	char **p, *cp;