summaryrefslogtreecommitdiff
path: root/src/common/compat.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-16 12:16:52 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-16 12:16:52 -0500
commit2a00110e5bd3592ff69e659681b9294285a98dd0 (patch)
treed262b5abd118dcebd6a11eb6fc0f3d3aa1f2094c /src/common/compat.c
parent79a24750ba8b3b1efc87c5b43d91229b6478ef82 (diff)
downloadtor-2a00110e5bd3592ff69e659681b9294285a98dd0.tar.gz
tor-2a00110e5bd3592ff69e659681b9294285a98dd0.zip
Revert "Stop checking whether environ is declared."
This reverts commit 954eeda619a59dae76144ad69967f0ed7341b564. Apparently, OpenBSD is what expects you to declare environ yourself. So 19142 is a wontfix.
Diffstat (limited to 'src/common/compat.c')
-rw-r--r--src/common/compat.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 97d1fafbbb..ebf05f59e1 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -2390,6 +2390,15 @@ make_path_absolute(char *fname)
#endif
}
+#ifndef HAVE__NSGETENVIRON
+#ifndef HAVE_EXTERN_ENVIRON_DECLARED
+/* Some platforms declare environ under some circumstances, others don't. */
+#ifndef RUNNING_DOXYGEN
+extern char **environ;
+#endif
+#endif
+#endif
+
/** Return the current environment. This is a portable replacement for
* 'environ'. */
char **