diff --git a/configure b/configure
index 8e30c686158b2214a89ea9344cab6906bd993d15..bff8159a5c859fd943c897c1d5a5823a9300a45f 100755
--- a/configure
+++ b/configure
@@ -5455,7 +5455,7 @@ check_func  ${malloc_prefix}memalign            && enable memalign
 check_func  ${malloc_prefix}posix_memalign      && enable posix_memalign
 
 check_func  access
-check_func  arc4random
+check_func_headers stdlib.h arc4random
 check_func_headers time.h clock_gettime || { check_func_headers time.h clock_gettime -lrt && add_extralibs -lrt && LIBRT="-lrt"; }
 check_func  fcntl
 check_func  fork