diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake/config.h.cmake | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 44b437c1..da0ccf88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,7 +197,7 @@ if(GLIB2_FOUND) endif() # analogous to AC_USE_SYSTEM_EXTENSIONS in configure.ac -add_definitions(-D_GNU_SOURCE) +set(_GNU_SOURCE 1) # do config checks include(ConfigureChecks) diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index b6532b13..86b4acb0 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -243,6 +243,11 @@ /* whether -export-dynamic was passed to libtool */ #cmakedefine DBUS_BUILT_R_DYNAMIC 1 +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +#cmakedefine _GNU_SOURCE 1 +#endif + // structs /* Define to 1 if you have struct cmsgred */ #cmakedefine HAVE_CMSGCRED 1 |