aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt17
1 files changed, 10 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 438e622..c496ad9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -220,14 +220,17 @@ if(HAVE_STRCASECMP)
220 add_definitions(-DHAVE_STRCASECMP) 220 add_definitions(-DHAVE_STRCASECMP)
221endif() 221endif()
222 222
223check_function_exists(strlcat HAVE_STRLCAT) 223# Emscripten's strlcat and strlcpy triggers ASAN errors
224if(HAVE_STRLCAT) 224if(NOT EMSCRIPTEN)
225 add_definitions(-DHAVE_STRLCAT) 225 check_function_exists(strlcat HAVE_STRLCAT)
226endif() 226 if(HAVE_STRLCAT)
227 add_definitions(-DHAVE_STRLCAT)
228 endif()
227 229
228check_function_exists(strlcpy HAVE_STRLCPY) 230 check_function_exists(strlcpy HAVE_STRLCPY)
229if(HAVE_STRLCPY) 231 if(HAVE_STRLCPY)
230 add_definitions(-DHAVE_STRLCPY) 232 add_definitions(-DHAVE_STRLCPY)
233 endif()
231endif() 234endif()
232 235
233check_function_exists(strndup HAVE_STRNDUP) 236check_function_exists(strndup HAVE_STRNDUP)