Comment 3 for bug 1730947

Revision history for this message
Stuart Longland (redhatter) wrote :

I hit the same bug on Gentoo with glibc-2.29-r2 and alsa-lib-1.1.8.

Looking at the code, I see they do something similar to the suggestion made in https://stackoverflow.com/a/32672476.

It would appear this kludge no longer works. Down later the suggestion was to tweak the -std=XXX flag passed to gcc. After unsuccessfully trying to set this in CFLAGS, I got things compiling with this:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 639fdc711..2d1c744f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@ include ("${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/GNUInstallDirs.cmake")
 project ("cairo-dock-plugins")
 set (VERSION "3.4.1")

-add_definitions (-std=c99 -Wall -Werror-implicit-function-declaration) # -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration -Wstrict-prototypes -Wreturn-type -Wparentheses -Warray-bounds)
+add_definitions (-std=gnu99 -Wall -Werror-implicit-function-declaration) # -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration -Wstrict-prototypes -Wreturn-type -Wparentheses -Warray-bounds)
 if (NOT DEFINED CMAKE_BUILD_TYPE)
        add_definitions (-O3)
 endif()

cairo-dock-plug-ins now build. I'm just trying them out to see if there are any ill effects from doing the above hack.