From bf6a78224b8d6a4958e2221d3ccc97056d87feeb Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Wed, 8 Feb 2017 12:38:20 +1100 Subject: [PATCH] libmysqlclient: fix redefinition of pthreads functions --- src/libmysqlclient-1-fixes.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/libmysqlclient-1-fixes.patch b/src/libmysqlclient-1-fixes.patch index 6b83ceb8..121de67f 100644 --- a/src/libmysqlclient-1-fixes.patch +++ b/src/libmysqlclient-1-fixes.patch @@ -450,3 +450,23 @@ index 1111111..2222222 100644 #include "mysys_priv.h" #include #include + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Wed, 8 Feb 2017 11:51:42 +1100 +Subject: [PATCH] only define localtime_r and gmtime_r when pthreads isn't used + + +diff --git a/include/my_global.h b/include/my_global.h +index 1111111..2222222 100644 +--- a/include/my_global.h ++++ b/include/my_global.h +@@ -629,7 +629,7 @@ enum loglevel { + }; + + +-#ifdef _WIN32 ++#if defined(_WIN32) && !defined(_POSIX_THREAD_SAFE_FUNCTIONS) + /**************************************************************************** + ** Replacements for localtime_r and gmtime_r + ****************************************************************************/