diff --git a/m4/virt-dbus.m4 b/m4/virt-dbus.m4 index 4ef0c82bb5..3f9b30686c 100644 --- a/m4/virt-dbus.m4 +++ b/m4/virt-dbus.m4 @@ -1,6 +1,6 @@ dnl The libdbus.so library dnl -dnl Copyright (C) 2012-2013 Red Hat, Inc. +dnl Copyright (C) 2012-2014 Red Hat, Inc. dnl dnl This library is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Lesser General Public @@ -26,6 +26,7 @@ AC_DEFUN([LIBVIRT_CHECK_DBUS],[ CFLAGS="$CFLAGS $DBUS_CFLAGS" LIBS="$LIBS $DBUS_LIBS" AC_CHECK_FUNCS([dbus_watch_get_unix_fd]) + AC_CHECK_TYPES([DBusBasicValue], [], [], [[#include ]]) CFLAGS="$old_CFLAGS" LIBS="$old_LIBS" fi diff --git a/src/util/virdbuspriv.h b/src/util/virdbuspriv.h index d45fb259bc..424774659e 100644 --- a/src/util/virdbuspriv.h +++ b/src/util/virdbuspriv.h @@ -1,7 +1,7 @@ /* * virdbuspriv.h: internal APIs for testing DBus code * - * Copyright (C) 2012-2013 Red Hat, Inc. + * Copyright (C) 2012-2014 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,6 +24,21 @@ # include "virdbus.h" +# if !HAVE_DBUSBASICVALUE +/* Copied (and simplified) from dbus 1.6.12, for use with older dbus headers */ +typedef union +{ + dbus_int16_t i16; /**< as int16 */ + dbus_uint16_t u16; /**< as int16 */ + dbus_int32_t i32; /**< as int32 */ + dbus_uint32_t u32; /**< as int32 */ + dbus_bool_t bool_val; /**< as boolean */ + dbus_int64_t i64; /**< as int64 */ + dbus_uint64_t u64; /**< as int64 */ + double dbl; /**< as double */ + unsigned char byt; /**< as byte */ +} DBusBasicValue; +# endif int virDBusMessageEncodeArgs(DBusMessage* msg, const char *types,