]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Move _GNU_SOURCE to config.h.cmake
authorRalf Habacker <ralf.habacker@freenet.de>
Tue, 16 Oct 2018 20:47:18 +0000 (22:47 +0200)
committerSimon McVittie <smcv@collabora.com>
Thu, 18 Nov 2021 12:52:22 +0000 (12:52 +0000)
CMakeLists.txt
cmake/config.h.cmake

index 44b437c161e53fade6eb602bd46a11bd5775e43a..da0ccf88d15a8cc9f05c94764f00e3e90e3d5513 100644 (file)
@@ -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)
index b6532b133fd418e93452704c07ddb957fbdc8c8a..86b4acb0297156a657ea3785f268e4ee4b441257 100644 (file)
 /* 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