Skip to content

Build fails on FreeBSD with clang

Clang does not seem to find xsettings_properties_Net array (in xfsettings/xsettings-properties.h), build failed:

gtk-settings.c:229:41: error: use of undeclared identifier 'xsettings_properties_Net'
  229 |     for (guint i = 0; i < G_N_ELEMENTS (xsettings_properties_Net); i++)
      |                                         ^
gtk-settings.c:229:41: error: use of undeclared identifier 'xsettings_properties_Net'
gtk-settings.c:230:54: error: use of undeclared identifier 'xsettings_properties_Net'
  230 |         g_hash_table_add (net_properties, (gpointer) xsettings_properties_Net[i]);
      |                                                      ^
3 errors generated.
gmake[3]: *** [Makefile:939: xfsettingsd-gtk-settings.o] Error 1

I try CFLAGS -Wno-unused-variable (with and without -Wall -Wextra) without success.

Currently my workaround is to include xsettings_properties_Net in xfsettings/gtk-settings.c