fix mysql gcc win32 threads build

This commit is contained in:
Tony Theodore 2016-08-16 15:02:44 +10:00
parent 42a5e3bad8
commit 12c05e1fcc
1 changed files with 2 additions and 1 deletions

View File

@ -426,12 +426,13 @@ diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
index 1111111..2222222 100644
--- a/mysys/CMakeLists.txt
+++ b/mysys/CMakeLists.txt
@@ -78,6 +78,10 @@ IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
@@ -78,6 +78,11 @@ IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
TARGET_LINK_LIBRARIES(mysys pthread)
ENDIF()
+IF(HAVE_PTHREAD_H)
+ ADD_DEFINITIONS(-DUSING_PTHREADS)
+ TARGET_LINK_LIBRARIES(mysys pthread)
+ENDIF()
+
IF(WITH_UNIT_TESTS)