On Linux, I configured the software package (llvm) and autoconf finds the function arc4random. Here's the extraction of output during configuration:
checking for strerror... yes
checking for strerror_r... yes
checking for setenv... yes
checking for arc4random... yes
checking for strtoll... yes
checking for strtoq... yes
checking for sysconf... yes
The configuration is going fine. Later, when creating the package, I get an error message specified by an unspecified specifier arc4random:
[removed]/lib/Support/Unix/Process.inc:368:10: error: use of undeclared identifier
'arc4random'
return arc4random();
^
Here is the location indicated:
367 #if defined(HAVE_ARC4RANDOM)
368 return arc4random();
369 #else
370 static int x = (::srand(GetRandomNumberSeed()), 0);
371 (void)x;
372 return ::rand();
373 #endif
It is properly guarded, here is configure.acpart:
AC_CHECK_FUNCS([strerror strerror_r setenv arc4random ])
Everything seems to be in order. I am wondering why the configure process has detected that the function will be available.
autoconf (GNU Autoconf) 2.63
Here is an excerpt from config.log:
configure --prefix=[removed] --host=powerpc64-bgq-linux --disable-terminfo --disable-zlib --enable-targets=powerpc CXX=bgclang++ CXXFLAGS=-O3 -fPIC CC=bgclang CFLAGS=-O3 -fPIC LDFLAGS=-shared
source
share