Displaying 1 result from an estimated 1 matches for "4ffacfcc".
2020 Apr 28
1
[PATCH nbdkit] freebsd, openbsd: Add an extern decl for environ.
...ed
+}
+]])
+    ],[
+    AC_MSG_RESULT([yes])
+    AC_DEFINE([HAVE_ENVIRON_DECL],[1],[environ is declared in headers])
+    ],[
+    AC_MSG_RESULT([no])
+    ]
+)
+
 dnl Check for other headers, all optional.
 AC_CHECK_HEADERS([\
 	alloca.h \
diff --git a/plugins/sh/call.c b/plugins/sh/call.c
index 4ffacfcc..91e69e9a 100644
--- a/plugins/sh/call.c
+++ b/plugins/sh/call.c
@@ -53,6 +53,10 @@
 
 #include "call.h"
 
+#ifndef HAVE_ENVIRON_DECL
+extern char **environ;
+#endif
+
 /* Temporary directory for scripts to use. */
 char tmpdir[] = "/tmp/nbdkitXXXXXX";
 
-- 
2.25.0