]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Fix gcc compile error: redundant redeclaration of ‘environ’ [-Werror=redundant-decls]
authorRalf Habacker <ralf.habacker@freenet.de>
Tue, 30 Nov 2021 09:14:05 +0000 (10:14 +0100)
committerRalf Habacker <ralf.habacker@freenet.de>
Tue, 30 Nov 2021 13:35:01 +0000 (14:35 +0100)
Cherry picked from dbus/dbus!227

CMakeLists.txt

index 3d38240335ebcc3933012b29f4d13d95ee350cf1..8b0cdf4225ecb2e801aff380208f9884e9e00338 100644 (file)
@@ -545,6 +545,11 @@ set(DBUS_DAEMON_NAME "dbus-daemon" CACHE STRING "The name of the dbus daemon exe
 
 #include(ConfigureChecks.cmake)
 
+# only defined but expected as boolean
+if(DEFINED HAVE_DECL_ENVIRON)
+    set(HAVE_DECL_ENVIRON 1)
+endif()
+
 # compiler definitions
 add_definitions(-DHAVE_CONFIG_H)
 add_definitions(${DBUS_BUS_CFLAGS})