Fix build with ENABLE_DBUS=OFF

This commit is contained in:
Viorel
2024-04-22 18:22:00 +03:00
parent 510a1f57f8
commit d745d7afef
2 changed files with 9 additions and 0 deletions
+4
View File
@@ -45,12 +45,16 @@ static void getKDE(FFstrbuf* result, FFDEOptions* options)
static const char* getGnomeBySo(FFstrbuf* result)
{
#ifdef FF_HAVE_DBUS
FFDBusData dbus;
if (ffDBusLoadData(DBUS_BUS_SESSION, &dbus) != NULL)
return "ffDBusLoadData() failed";
ffDBusGetPropertyString(&dbus, "org.gnome.Shell", "/org/gnome/Shell", "org.gnome.Shell", "ShellVersion", result);
return NULL;
#else // FF_HAVE_DBUS
return "ffDBusLoadData() failed: dbus support not compiled in";
#endif // FF_HAVE_DBUS
}
static void getGnome(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options)