Skip to content

Commit 0c49e52

Browse files
committed
build: remove unneeded getentropy detection (HAVE_GETENTROPY)
1 parent 5cd15ff commit 0c49e52

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

configure.ac

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,13 +1109,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
11091109
[ AC_MSG_RESULT([no])]
11101110
)
11111111

1112-
AC_MSG_CHECKING([for getentropy])
1113-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]],
1114-
[[ getentropy(nullptr, 32) ]])],
1115-
[ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETENTROPY], [1], [Define this symbol if the BSD getentropy system call is available]) ],
1116-
[ AC_MSG_RESULT([no])]
1117-
)
1118-
11191112
AC_MSG_CHECKING([for getentropy via random.h])
11201113
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
11211114
#include <sys/random.h>]],

src/random.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@
3232
#include <sys/syscall.h>
3333
#include <linux/random.h>
3434
#endif
35-
#if defined(HAVE_GETENTROPY) || (defined(HAVE_GETENTROPY_RAND) && defined(MAC_OSX))
36-
#include <unistd.h>
37-
#endif
3835
#if defined(HAVE_GETENTROPY_RAND) && defined(MAC_OSX)
36+
#include <unistd.h>
3937
#include <sys/random.h>
4038
#endif
4139
#ifdef HAVE_SYSCTL_ARND

0 commit comments

Comments
 (0)