Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 6ae6536

Browse files
committed
autotools: Use AC_CHECK_DECL to check for getentropy
Should fix build issue on iOS.
1 parent ed8b426 commit 6ae6536

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

configure.ac

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,17 @@ AC_CHECK_HEADERS([glob.h])
310310
AM_CONDITIONAL(WITH_GLOB, test "$ac_cv_header_glob_h" = "yes")
311311

312312
dnl Checks for library functions.
313-
AC_CHECK_FUNCS([getentropy gettimeofday ftime stat mmap munmap])
313+
AC_CHECK_FUNCS([gettimeofday ftime stat mmap munmap])
314314

315315
AH_VERBATIM([HAVE_MUNMAP_AFTER],[/* mmap() is no good without munmap() */
316316
#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
317317
# undef /**/ HAVE_MMAP
318318
#endif])
319319

320+
AC_CHECK_DECL([getentropy],
321+
[AC_DEFINE([HAVE_GETENTROPY], [1], [getentropy])], [],
322+
[#include <sys/random.h>])
323+
320324
dnl
321325
dnl Checks for inet libraries
322326
dnl

0 commit comments

Comments
 (0)