mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
use _GNU_SOURCE on Linux to have all useful definitions (pthread_rwlock_t) for example
This commit is contained in:
parent
3fe740e13d
commit
5cddb6c15f
3 changed files with 3 additions and 1 deletions
|
@ -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})
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue