summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-07-25 14:15:33 +0200
committerSergei Golubchik <sergii@pisem.net>2014-07-25 14:15:33 +0200
commitbe667b8c42f9d67f61409be594603d73f007d405 (patch)
tree57730dcf5de83fe49c3dfce14d585b953c5e2277
parent44aacfc5c36453b6ca2a22f4795f774f579f058c (diff)
downloadmariadb-git-be667b8c42f9d67f61409be594603d73f007d405.tar.gz
MDEV-5706 MariaDB does not build on hurd-i386
backport from 10.0 the fix for: MDEV-5756 CMake option to build without thread pool
-rw-r--r--sql/CMakeLists.txt10
-rw-r--r--sql/scheduler.h5
2 files changed, 11 insertions, 4 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 376f9773ab2..22cc9ac4be7 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -30,7 +30,15 @@ ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES} PROPERTIES GENERATED 1)
-ADD_DEFINITIONS(-DMYSQL_SERVER -DHAVE_EVENT_SCHEDULER -DHAVE_POOL_OF_THREADS)
+ADD_DEFINITIONS(-DMYSQL_SERVER -DHAVE_EVENT_SCHEDULER)
+
+IF (CMAKE_SYSTEM_NAME MATCHES "Linux" OR
+ CMAKE_SYSTEM_NAME MATCHES "Windows" OR
+ CMAKE_SYSTEM_NAME MATCHES "SunOS" OR
+ HAVE_KQUEUE)
+ ADD_DEFINITIONS(-DHAVE_POOL_OF_THREADS)
+ENDIF()
+
IF(SSL_DEFINES)
ADD_DEFINITIONS(${SSL_DEFINES})
ENDIF()
diff --git a/sql/scheduler.h b/sql/scheduler.h
index 4e200e86d74..f7aff377eac 100644
--- a/sql/scheduler.h
+++ b/sql/scheduler.h
@@ -99,14 +99,13 @@ public:
void *data; /* scheduler-specific data structure */
};
-#if !defined(EMBEDDED_LIBRARY)
-#define HAVE_POOL_OF_THREADS 1
+#ifdef HAVE_POOL_OF_THREADS
void pool_of_threads_scheduler(scheduler_functions* func,
ulong *arg_max_connections,
uint *arg_connection_count);
#else
#define pool_of_threads_scheduler(A,B,C) \
one_thread_per_connection_scheduler(A, B, C)
-#endif
+#endif /*HAVE_POOL_OF_THREADS*/
#endif /* SCHEDULER_INCLUDED */