Skip to content

Commit

Permalink
Fix build with ENABLE_DBUS=OFF
Browse files Browse the repository at this point in the history
  • Loading branch information
ceamac committed Apr 22, 2024
1 parent 510a1f5 commit d745d7a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 2.10.1

Bugfixes:
* fix build with ENABLE_DBUS=OFF

# 2.10.0

Changes:
Expand Down
4 changes: 4 additions & 0 deletions src/detection/de/de_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d745d7a

Please sign in to comment.