diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-02-20 13:00:17 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-02-20 13:00:17 -0500 |
commit | 81fe3e438b39cd14986247581d03cb0d0d650f1d (patch) | |
tree | 9ea09d5fdd7e5a093e3439a6d13e53f4ce2e8f4b /src/common | |
parent | 73d2f335c5ea13d9f8b8e6d3b4dd200057db70b3 (diff) | |
parent | bc66878bdea0250991fc99b2d023146f67a6f4bb (diff) | |
download | tor-81fe3e438b39cd14986247581d03cb0d0d650f1d.tar tor-81fe3e438b39cd14986247581d03cb0d0d650f1d.tar.gz |
Merge remote-tracking branch 'sebastian/bug5161'
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/compat.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index f25a8ac3b..30bde3d1c 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -16,7 +16,11 @@ * We also need it to make memmem get defined (where available) */ /* XXXX023 We should just use AC_USE_SYSTEM_EXTENSIONS in our autoconf, - * and get this (and other important stuff!) automatically */ + * and get this (and other important stuff!) automatically. Once we do that, + * make sure to also change the extern char **environ detection in + * configure.in, because whether that is declared or not depends on whether + * we have _GNU_SOURCE defined! Maybe that means that once we take this out, + * we can also take out the configure check. */ #define _GNU_SOURCE #include "compat.h" @@ -1663,9 +1667,11 @@ make_path_absolute(char *fname) } #ifndef HAVE__NSGETENVIRON -/* FreeBSD needs this; it doesn't seem to hurt other platforms. */ +#ifndef HAVE_EXTERN_ENVIRON_DECLARED__ +/* Some platforms declare environ under some circumstances, others don't. */ extern char **environ; #endif +#endif /** Return the current environment. This is a portable replacement for * 'environ'. */ |