Skip to content

Commit

Permalink
enable system arc4random on FreeBSD 12+
Browse files Browse the repository at this point in the history
  • Loading branch information
busterb committed Nov 1, 2023
1 parent ce79c96 commit 124e019
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions m4/check-os-options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,15 @@ char buf[1]; getentropy(buf, 1);
*freebsd*)
HOST_OS=freebsd
HOST_ABI=elf
# fork detection missing, weak seed on failure
# https://svnweb.freebsd.org/base/head/lib/libc/gen/arc4random.c?revision=268642&view=markup
USE_BUILTIN_ARC4RANDOM=yes
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/param.h>
#if __FreeBSD_version < 1200000
undefined
#endif
]], [[]])],
[ USE_BUILTIN_ARC4RANDOM=no ],
[ USE_BUILTIN_ARC4RANDOM=yes ]
)
AC_SUBST([PROG_LDADD], ['-lthr'])
;;
*hpux*)
Expand Down

0 comments on commit 124e019

Please sign in to comment.