mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
Fix a compilation problem with old dbus,
Daniel
This commit is contained in:
parent
af61834687
commit
466f86052f
@ -1,3 +1,8 @@
|
|||||||
|
Fri Dec 5 16:03:53 CET 2008 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
|
* src/node_device_hal.c configure.in: fix a compilation problem
|
||||||
|
with old dbus versions
|
||||||
|
|
||||||
Thu Dec 5 10:10:41 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
Thu Dec 5 10:10:41 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* src/domain_conf.c: Disable a few more functions for proxy
|
* src/domain_conf.c: Disable a few more functions for proxy
|
||||||
|
@ -1164,6 +1164,7 @@ if test "x$with_hal" = "xyes" -o "x$with_hal" = "xcheck"; then
|
|||||||
CFLAGS="$CFLAGS $HAL_CFLAGS"
|
CFLAGS="$CFLAGS $HAL_CFLAGS"
|
||||||
LDFLAGS="$LDFLAGS $HAL_LIBS"
|
LDFLAGS="$LDFLAGS $HAL_LIBS"
|
||||||
AC_CHECK_FUNCS([libhal_get_all_devices],,[with_hal=no])
|
AC_CHECK_FUNCS([libhal_get_all_devices],,[with_hal=no])
|
||||||
|
AC_CHECK_FUNCS([dbus_watch_get_unix_fd])
|
||||||
CFLAGS="$old_CFLAGS"
|
CFLAGS="$old_CFLAGS"
|
||||||
LDFLAGS="$old_LDFLAGS"
|
LDFLAGS="$old_LDFLAGS"
|
||||||
fi
|
fi
|
||||||
|
@ -611,6 +611,7 @@ static dbus_bool_t add_dbus_watch(DBusWatch *watch,
|
|||||||
void *data ATTRIBUTE_UNUSED)
|
void *data ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
int fd;
|
||||||
struct nodeDeviceWatchInfo *info;
|
struct nodeDeviceWatchInfo *info;
|
||||||
|
|
||||||
if (VIR_ALLOC(info) < 0)
|
if (VIR_ALLOC(info) < 0)
|
||||||
@ -619,8 +620,13 @@ static dbus_bool_t add_dbus_watch(DBusWatch *watch,
|
|||||||
if (dbus_watch_get_enabled(watch))
|
if (dbus_watch_get_enabled(watch))
|
||||||
flags = xlate_dbus_watch_flags(dbus_watch_get_flags(watch));
|
flags = xlate_dbus_watch_flags(dbus_watch_get_flags(watch));
|
||||||
|
|
||||||
info->watch = virEventAddHandle(dbus_watch_get_unix_fd(watch), flags,
|
#if HAVE_DBUS_WATCH_GET_UNIX_FD
|
||||||
dbus_watch_callback, watch, NULL);
|
fd = dbus_watch_get_unix_fd(watch);
|
||||||
|
#else
|
||||||
|
fd = dbus_watch_get_fd(watch);
|
||||||
|
#endif
|
||||||
|
info->watch = virEventAddHandle(fd, flags, dbus_watch_callback,
|
||||||
|
watch, NULL);
|
||||||
if (info->watch < 0) {
|
if (info->watch < 0) {
|
||||||
VIR_FREE(info);
|
VIR_FREE(info);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user