[PATCH] rpc: fix build failure with older dbus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



RHEL 6.3 uses dbus-devel-1.2.24, which lacked support for the
DBUS_TYPE_UNIX_FD define (contrast with Fedora 18 using 1.6.8).
But since it is an older dbus, it also lacks support for shutdown
inhibitions as provided by newer systemd.

Compilation failure introduced in commit 31330926.

* src/rpc/virnetserver.c (virNetServerAddShutdownInhibition):
Compile out if dbus is too old.
---

Pushing under the build-breaker rule.

 src/rpc/virnetserver.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
index ae1dfa2..6a5a53a 100644
--- a/src/rpc/virnetserver.c
+++ b/src/rpc/virnetserver.c
@@ -720,7 +720,7 @@ void virNetServerAutoShutdown(virNetServerPtr srv,
 }


-#ifdef HAVE_DBUS
+#if defined(HAVE_DBUS) && defined(DBUS_TYPE_UNIX_FD)
 static void virNetServerGotInhibitReply(DBusPendingCall *pending,
                                         void *opaque)
 {
@@ -809,7 +809,7 @@ void virNetServerAddShutdownInhibition(virNetServerPtr srv)

     VIR_DEBUG("srv=%p inhibitions=%zu", srv, srv->autoShutdownInhibitions);

-#ifdef HAVE_DBUS
+#if defined(HAVE_DBUS) && defined(DBUS_TYPE_UNIX_FD)
     if (srv->autoShutdownInhibitions == 1)
         virNetServerCallInhibit(srv,
                                 "shutdown",
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]