From: Ralf Habacker Date: Tue, 30 Nov 2021 09:14:05 +0000 (+0100) Subject: Fix gcc compile error: redundant redeclaration of ‘environ’ [-Werror=redundant-decls] X-Git-Tag: dbus-1.13.20~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8b34b419e44e0b95622f45c0f17487e241b1961;p=thirdparty%2Fdbus.git Fix gcc compile error: redundant redeclaration of ‘environ’ [-Werror=redundant-decls] Cherry picked from dbus/dbus!227 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d3824033..8b0cdf422 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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})