build: limit arc4random detection to no-SSL configs
`arc4random()` is no longer used if any TLS backend is active. Limit feature detection to builds with no TLS backend. Closes #14909
This commit is contained in:
parent
44f9ce02a9
commit
d1bf447992
@ -1490,7 +1490,6 @@ check_symbol_exists("stricmp" "${CURL_INCLUDES};string.h" HAVE_STRICMP)
|
||||
check_symbol_exists("strcmpi" "${CURL_INCLUDES};string.h" HAVE_STRCMPI)
|
||||
check_symbol_exists("memrchr" "${CURL_INCLUDES};string.h" HAVE_MEMRCHR)
|
||||
check_symbol_exists("alarm" "${CURL_INCLUDES}" HAVE_ALARM)
|
||||
check_symbol_exists("arc4random" "${CURL_INCLUDES};stdlib.h" HAVE_ARC4RANDOM)
|
||||
check_symbol_exists("fcntl" "${CURL_INCLUDES}" HAVE_FCNTL)
|
||||
check_symbol_exists("getppid" "${CURL_INCLUDES}" HAVE_GETPPID)
|
||||
check_symbol_exists("utimes" "${CURL_INCLUDES}" HAVE_UTIMES)
|
||||
@ -1527,6 +1526,10 @@ check_symbol_exists("setlocale" "${CURL_INCLUDES}" HAVE_SETLOCALE)
|
||||
check_symbol_exists("setmode" "${CURL_INCLUDES}" HAVE_SETMODE)
|
||||
check_symbol_exists("setrlimit" "${CURL_INCLUDES}" HAVE_SETRLIMIT)
|
||||
|
||||
if(NOT _ssl_enabled)
|
||||
check_symbol_exists("arc4random" "${CURL_INCLUDES};stdlib.h" HAVE_ARC4RANDOM)
|
||||
endif()
|
||||
|
||||
if(NOT MSVC OR (MSVC_VERSION GREATER_EQUAL 1900))
|
||||
# Earlier MSVC compilers had faulty snprintf implementations
|
||||
check_symbol_exists("snprintf" "stdio.h" HAVE_SNPRINTF)
|
||||
|
||||
@ -3969,7 +3969,6 @@ AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Se
|
||||
|
||||
AC_CHECK_FUNCS([\
|
||||
_fseeki64 \
|
||||
arc4random \
|
||||
eventfd \
|
||||
fnmatch \
|
||||
geteuid \
|
||||
@ -3992,6 +3991,10 @@ AC_CHECK_FUNCS([\
|
||||
utimes \
|
||||
])
|
||||
|
||||
if test -z "$ssl_backends"; then
|
||||
AC_CHECK_FUNCS([arc4random])
|
||||
fi
|
||||
|
||||
if test "$curl_cv_native_windows" != 'yes'; then
|
||||
AC_CHECK_FUNCS([fseeko])
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user