Image 01
profile-image

rohanpm

Rohan McGovern
kdbus

System Software by rohanpm 12 comments

This is the patch I ended up making. Note that this probably makes no difference to anything, because this part of the code deals with whether or not another process can 'steal' kdbus's connection name, but kdbus doesn't use a named connection to dbus anyway.

--- src/dbus-qt3-backport/qdbusconnection.cpp (revision 510765)
+++ src/dbus-qt3-backport/qdbusconnection.cpp (working copy)
@@ -373,8 +373,15 @@
return false;

int dbusFlags = 0;
+#ifdef DBUS_NAME_FLAG_ALLOW_REPLACEMENT
if (modeFlags & AllowReplace)
dbusFlags |= DBUS_NAME_FLAG_ALLOW_REPLACEMENT;
+#elif defined DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT
+ if (!(modeFlags & AllowReplace))
+ dbusFlags |= DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT;
+#else
+#error Neither DBUS_NAME_FLAG_ALLOW_REPLACEMENT nor DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT are defined.
+#endif
if (modeFlags & ReplaceExisting)
dbusFlags |= DBUS_NAME_FLAG_REPLACE_EXISTING; - Feb 19 2006
kdbus

System Software by rohanpm 12 comments

Thanks for the investigation. It turns out that particular macro changed name between dbus-0.50 and dbus-0.60. So, I take it you guys are trying to compile kdbus with dbus 0.50 or earlier :-)

In kdbus 0.8.6 I fixed it to compile with either dbus 0.50 or 0.60. dbus earlier than 0.50 is not supported. - Feb 19 2006