summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-12-23 11:53:25 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-01-11 19:39:32 -0500
commit247cd336af9b9367697e0b5a7a82c5227f986a97 (patch)
tree1f0c9f0331b90e526172fe25c860f67ed7b592de /configure.ac
parent6737c8e1ed67a2ec3f1fa3e91cb279f689d3da6f (diff)
downloadhaskell-247cd336af9b9367697e0b5a7a82c5227f986a97.tar.gz
rts: Only declare environ when necessary
Previously we would unconditionally provide a declaration for `environ`, even if `<unistd.h>` already provided one. This would result in `-Werror` builds failing on some platforms. Also `#include <unistd.h>` to ensure that the declaration is visible. Fixes #20861.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a4694df27a..cb670a2a14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -966,6 +966,9 @@ AC_CHECK_HEADERS([sys/cpuset.h], [], [],
#endif
]])
+dnl ** check whether a declaration for `environ` is provided by libc.
+FP_CHECK_ENVIRON
+
dnl ** check if it is safe to include both <time.h> and <sys/time.h>
AC_HEADER_TIME