chiark / gitweb /
autoconf: Test for getentropy
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 11 Sep 2026 09:30:05 +0000 (10:30 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 11 Sep 2026 11:48:01 +0000 (12:48 +0100)
configure
configure.in
src/config.h.in

index df2ff29024e64e5047c3eee59f345e391d617a38..8b7ddd7e6b01849232e1e02d47e046f25490afc0 100755 (executable)
--- a/configure
+++ b/configure
@@ -3857,6 +3857,12 @@ if test "x$ac_cv_func_poll" = xyes
 then :
   printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
 
+fi
+ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
+if test "x$ac_cv_func_getentropy" = xyes
+then :
+  printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
+
 fi
 
 
index b753a5bb3e235b30d61b50e9a57dad25f384995b..8d961cbc892f02001d6146c14ba5f91bbfa6f779 100644 (file)
@@ -61,7 +61,7 @@ AC_PROG_CPP
 AC_PROG_RANLIB
 AC_PROG_INSTALL
 
-AC_CHECK_FUNCS(poll)
+AC_CHECK_FUNCS(poll getentropy)
 ADNS_C_GETFUNC(socket,socket)
 ADNS_C_GETFUNC(inet_ntoa,nsl)
 
index 4fb4cca3e2ca26831f7d1316b9d8b614f9be416c..e748cd9231334b26988dd15fa3dec528a451faed 100644 (file)
@@ -40,6 +40,9 @@
 #undef HAVEUSE_RPCTYPES_H
 
 
+/* Define to 1 if you have the 'getentropy' function. */
+#undef HAVE_GETENTROPY
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H