]>
Commit | Line | Data |
---|---|---|
1 | --- getenv.c.orig 2004-12-01 20:08:48.000000000 -0800 | |
2 | +++ getenv.c 2004-12-01 20:10:20.000000000 -0800 | |
3 | @@ -40,8 +40,9 @@ | |
4 | #include <stdlib.h> | |
5 | #include <stddef.h> | |
6 | #include <string.h> | |
7 | +#include <crt_externs.h> | |
8 | ||
9 | -inline char *__findenv(const char *, int *); | |
10 | +inline char *__findenv(const char *, int *) __attribute__((always_inline)); | |
11 | ||
12 | /* | |
13 | * __findenv -- | |
14 | @@ -57,7 +58,7 @@ | |
15 | const char *name; | |
16 | int *offset; | |
17 | { | |
18 | - extern char **environ; | |
19 | + char **environ = *_NSGetEnviron(); | |
20 | int len, i; | |
21 | const char *np; | |
22 | char **p, *cp; |