From d4dbde9fc5bb217fe279b162195961552837fcca Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Sat, 19 Mar 2022 14:48:04 +0000 Subject: [PATCH] =?utf8?q?Revert=20"Fix=20gcc=20compile=20error:=20redunda?= =?utf8?q?nt=20redeclaration=20of=20=E2=80=98environ=E2=80=99=20[-Werror?= =?utf8?q?=3Dredundant-decls]"?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Breaks the build on FreeBSD which doens't have an environ declaration. The CMake check_symbol_exists call sets `HAVE_DECL_ENVIRON` to an empty variable (which means if(DEFINED) suceeds). This normalization should not be necessary as it will be handled correctly by `#cmakedefine01`. If not, all the other HAVE_* defines would also be wrong. This reverts commit e8b34b419e44e0b95622f45c0f17487e241b1961. --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 210e5311a..66590792c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -625,11 +625,6 @@ 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}) -- 2.47.3