mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
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:
parent
cab0cfd5cf
commit
2215befc8b
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user