diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-04-30 12:48:33 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-04-30 12:48:33 -0400 |
commit | 6156403237fc1775a55000af5b792a5bb1b6e0f3 (patch) | |
tree | 61bf7d582f656814b7fdc1d4a7c30b97153b5a38 /configure.in | |
parent | 9dddfe83f3041e1504d2def5622633eb59a9756f (diff) | |
download | tor-6156403237fc1775a55000af5b792a5bb1b6e0f3.tar.gz tor-6156403237fc1775a55000af5b792a5bb1b6e0f3.zip |
Fix headers in test for whether environ is declared in stdlib/unistd
We'd had our configure.in test include unistd.h unconditionally,
which would fail on Windows/mingw, even though environ _was_
declared there. Fix for 5704; bugfix on 0.2.3.13-alpha.
Thanks to Erinn for finding this and rransom for figuring out the
problem.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.in b/configure.in index e6f379c23d..d4ea6c6d15 100644 --- a/configure.in +++ b/configure.in @@ -1116,7 +1116,10 @@ AC_CACHE_CHECK([whether we have extern char **environ already declared], /* We define _GNU_SOURCE here because it is also defined in compat.c. * Without it environ doesn't get declared. */ #define _GNU_SOURCE +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif +#include <stdlib.h> int main(int c, char **v) { char **t = environ; }])], tor_cv_have_environ_declared=yes, tor_cv_have_environ_declared=no)) |