Skip to content
Snippets Groups Projects
Commit 61564032 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

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.
parent 9dddfe83
No related branches found
No related tags found
No related merge requests found
o Minor bugfixes:
- Fix compilation on platforms without unistd.h, or where environ
is defined in stdlib.h. Fixes bug 5704; bugfix on
0.2.3.13-alpha.
\ No newline at end of file
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment