From: Ralf Habacker Date: Tue, 16 Oct 2018 20:47:18 +0000 (+0200) Subject: Move _GNU_SOURCE to config.h.cmake X-Git-Tag: dbus-1.13.20~32^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b41f053c59c942f8c6dfa6eafc415a63d30edf1;p=thirdparty%2Fdbus.git Move _GNU_SOURCE to config.h.cmake --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 44b437c16..da0ccf88d 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 b6532b133..86b4acb02 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