]> git.saurik.com Git - apple/libc.git/blobdiff - stdlib/FreeBSD/getenv.c.patch
Libc-320.tar.gz
[apple/libc.git] / stdlib / FreeBSD / getenv.c.patch
diff --git a/stdlib/FreeBSD/getenv.c.patch b/stdlib/FreeBSD/getenv.c.patch
new file mode 100644 (file)
index 0000000..12472a3
--- /dev/null
@@ -0,0 +1,19 @@
+--- getenv.c.orig      Mon Apr 28 16:37:26 2003
++++ getenv.c   Sat May  3 14:29:07 2003
+@@ -40,6 +40,7 @@
+ #include <stdlib.h>
+ #include <stddef.h>
+ #include <string.h>
++#include <crt_externs.h>
+ inline char *__findenv(const char *, int *);
+@@ -57,7 +58,7 @@
+       const char *name;
+       int *offset;
+ {
+-      extern char **environ;
++      char **environ = *_NSGetEnviron();
+       int len, i;
+       const char *np;
+       char **p, *cp;