mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-05 22:05:47 +00:00
Convert HAVE_DBUS to WITH_DBUS
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
e763ad256d
commit
da77f04ed5
@ -1112,7 +1112,7 @@ if test "$with_dbus" = "yes" || test "$with_dbus" = "check" ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$with_dbus" = "yes" ; then
|
if test "$with_dbus" = "yes" ; then
|
||||||
AC_DEFINE_UNQUOTED([HAVE_DBUS], 1, [enable communication with DBus])
|
AC_DEFINE_UNQUOTED([WITH_DBUS], 1, [enable communication with DBus])
|
||||||
|
|
||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
save_CFLAGS="$CFLAGS"
|
save_CFLAGS="$CFLAGS"
|
||||||
@ -1122,7 +1122,7 @@ if test "$with_dbus" = "yes" ; then
|
|||||||
LIBS="$save_LIBS"
|
LIBS="$save_LIBS"
|
||||||
CFLAGS="$save_CFLAGS"
|
CFLAGS="$save_CFLAGS"
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([HAVE_DBUS], [test "$with_dbus" = "yes"])
|
AM_CONDITIONAL([WITH_DBUS], [test "$with_dbus" = "yes"])
|
||||||
|
|
||||||
|
|
||||||
dnl PolicyKit library
|
dnl PolicyKit library
|
||||||
|
@ -172,9 +172,9 @@ nwfilterDriverStartup(bool privileged ATTRIBUTE_UNUSED,
|
|||||||
char *base = NULL;
|
char *base = NULL;
|
||||||
DBusConnection *sysbus = NULL;
|
DBusConnection *sysbus = NULL;
|
||||||
|
|
||||||
#if HAVE_DBUS
|
#if WITH_DBUS
|
||||||
sysbus = virDBusGetSystemBus();
|
sysbus = virDBusGetSystemBus();
|
||||||
#endif /* HAVE_DBUS */
|
#endif /* WITH_DBUS */
|
||||||
|
|
||||||
if (VIR_ALLOC(driverState) < 0) {
|
if (VIR_ALLOC(driverState) < 0) {
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_DBUS
|
#define VIR_FROM_THIS VIR_FROM_DBUS
|
||||||
|
|
||||||
#ifdef HAVE_DBUS
|
#ifdef WITH_DBUS
|
||||||
|
|
||||||
static DBusConnection *systembus = NULL;
|
static DBusConnection *systembus = NULL;
|
||||||
static DBusConnection *sessionbus = NULL;
|
static DBusConnection *sessionbus = NULL;
|
||||||
@ -223,7 +223,7 @@ static void virDBusToggleWatch(DBusWatch *watch,
|
|||||||
(void)virEventUpdateHandle(info->watch, flags);
|
(void)virEventUpdateHandle(info->watch, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* ! HAVE_DBUS */
|
#else /* ! WITH_DBUS */
|
||||||
DBusConnection *virDBusGetSystemBus(void)
|
DBusConnection *virDBusGetSystemBus(void)
|
||||||
{
|
{
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
@ -237,5 +237,4 @@ DBusConnection *virDBusGetSessionBus(void)
|
|||||||
"%s", _("DBus support not compiled into this binary"));
|
"%s", _("DBus support not compiled into this binary"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif /* ! WITH_DBUS */
|
||||||
#endif /* ! HAVE_DBUS */
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#ifndef __VIR_DBUS_H__
|
#ifndef __VIR_DBUS_H__
|
||||||
# define __VIR_DBUS_H__
|
# define __VIR_DBUS_H__
|
||||||
|
|
||||||
# ifdef HAVE_DBUS
|
# ifdef WITH_DBUS
|
||||||
# include <dbus/dbus.h>
|
# include <dbus/dbus.h>
|
||||||
# else
|
# else
|
||||||
# define DBusConnection void
|
# define DBusConnection void
|
||||||
|
Loading…
Reference in New Issue
Block a user