summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@koala>2010-01-13 16:52:14 +0100
committerVladislav Vaintroub <vvaintroub@koala>2010-01-13 16:52:14 +0100
commit8807608561c446d14419aa49fe2e3519448d671a (patch)
tree2cd66cc26c468b749cf92110dd6bd273e0c5cc4e
parent5c871c90170c8839fce079704826873e0dab1c30 (diff)
downloadmariadb-git-8807608561c446d14419aa49fe2e3519448d671a.tar.gz
use _GNU_SOURCE on Linux to have all useful definitions (pthread_rwlock_t) for example
-rw-r--r--cmake/abi_check.cmake2
-rw-r--r--config.h.cmake1
-rw-r--r--configure.cmake1
3 files changed, 3 insertions, 1 deletions
diff --git a/cmake/abi_check.cmake b/cmake/abi_check.cmake
index 8e8426d5245..80c57fa0a6e 100644
--- a/cmake/abi_check.cmake
+++ b/cmake/abi_check.cmake
@@ -20,7 +20,7 @@
#
# We use gcc specific preprocessing command and sed/diff, so it will
# only be run on Unix and only if gcc is used.
-IF(CMAKE_COMPILER_IS_GNUCC AND UNIX)
+IF(CMAKE_COMPILER_IS_GNUCC AND Linux)
IF(CMAKE_C_COMPILER MATCHES "ccache$")
SET(COMPILER ${CMAKE_C_COMPILER_ARG1})
STRING(REGEX REPLACE "^ " "" COMPILER ${COMPILER})
diff --git a/config.h.cmake b/config.h.cmake
index 452525da24e..7abd23cb4b8 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -18,6 +18,7 @@
#cmakedefine DOT_FRM_VERSION @DOT_FRM_VERSION@
/* Headers we may want to use. */
#cmakedefine STDC_HEADERS 1
+#cmakedefine _GNU_SOURCE 1
#cmakedefine HAVE_ALLOCA_H 1
#cmakedefine HAVE_AIO_H 1
#cmakedefine HAVE_ARPA_INET_H 1
diff --git a/configure.cmake b/configure.cmake
index 9df2a4f19a1..271e18c04fd 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -49,6 +49,7 @@ ENDIF()
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
SET(TARGET_OS_LINUX 1)
SET(HAVE_NPTL 1)
+ SET(_GNU_SOURCE 1)
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
SET(TARGET_OS_SOLARIS 1)
ENDIF()