Move check for strlcpy before config.h generation

Fixes: 225aa107f6 ("Define strlcpy only on platforms where it's not available")
This commit is contained in:
David Heidelberg 2024-01-19 22:48:43 +01:00 committed by GitHub
parent 699d1bf27c
commit 371b9a7fc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -326,6 +326,9 @@ if(HAVE_LINK_ATOMIC)
set(PLATFORM_LIBS ${PLATFORM_LIBS} "-latomic")
endif()
include(CheckSymbolExists)
check_symbol_exists(strlcpy "string.h" HAVE_STRLCPY)
check_include_files(endian.h HAVE_ENDIAN_H)
configure_file(
@ -693,9 +696,6 @@ endif()
# Set some optimizations and tweaks
include(CheckCSourceCompiles)
include(CheckSymbolExists)
check_symbol_exists(strlcpy "string.h" HAVE_STRLCPY)
set(CMAKE_REQUIRED_INCLUDES ${LUA_INCLUDE_DIR})
if(USE_LUAJIT)