rpc: fix build failure with older dbus

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.
This commit is contained in:
Eric Blake 2012-12-04 15:45:11 -07:00
parent cab0cfd5cf
commit 2215befc8b

View File

@ -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",