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@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to