From: Ian Jackson Date: Fri, 11 Sep 2026 09:30:05 +0000 (+0100) Subject: autoconf: Test for getentropy X-Git-Tag: adns-1.7.0~12 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9c197c4c59313f071de3cf6e55f77ba87c18f478;p=adns.git autoconf: Test for getentropy --- diff --git a/configure b/configure index df2ff29..8b7ddd7 100755 --- 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 diff --git a/configure.in b/configure.in index b753a5b..8d961cb 100644 --- a/configure.in +++ b/configure.in @@ -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) diff --git a/src/config.h.in b/src/config.h.in index 4fb4cca..e748cd9 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -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 header file. */ #undef HAVE_INTTYPES_H