1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-17 02:15:22 +02:00

Define strlcpy only on platforms where it's not available

Linux musl-libc and recent glibc > 2.38 have it.

Signed-off-by: David Heidelberg <david@ixit.cz>
This commit is contained in:
David Heidelberg
2024-01-17 20:51:49 +01:00
committed by sfan5
parent e416c99419
commit 225aa107f6
3 changed files with 5 additions and 15 deletions

View File

@@ -695,6 +695,8 @@ endif()
include(CheckCSourceCompiles)
include(CheckSymbolExists)
check_symbol_exists(strlcpy "string.h" HAVE_STRLCPY)
set(CMAKE_REQUIRED_INCLUDES ${LUA_INCLUDE_DIR})
if(USE_LUAJIT)
set(CMAKE_REQUIRED_LIBRARIES ${LUA_LIBRARY})