Fixed #8090: Duplicate definition of strndup (#8102)

* Fixed #8090: Duplicate definition of strndup

* Moved strndup detection to winpr

Co-authored-by: Armin Novak <anovak@thincast.com>
This commit is contained in:
akallabeth
2022-08-02 09:15:38 +02:00
committed by GitHub
parent 0460215a24
commit bf56a39e6f
6 changed files with 9 additions and 35 deletions

View File

@@ -312,12 +312,6 @@ if(NOT IOS)
find_package(Threads REQUIRED)
endif()
if (IOS)
set(HAVE_STRNDUP 1)
else()
CHECK_SYMBOL_EXISTS(strndup string.h HAVE_STRNDUP)
endif()
# Enable address sanitizer, where supported and when required
if(${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCC)
CHECK_C_COMPILER_FLAG ("-fno-omit-frame-pointer" fno-omit-frame-pointer)