[libvirt] [PATCH] dbus: work with older dbus

dbus 1.2.24 (on RHEL 6) lacks DBUS_TYPE_UNIX_FD; but as we aren't trying to pass one of those anyways, we can just drop support for it in our wrapper. Solves this build error: CC libvirt_util_la-virdbus.lo util/virdbus.c:242: error: 'DBUS_TYPE_UNIX_FD' undeclared here (not in a function) * src/util/virdbus.c (virDBusBasicTypes): Drop support for unix fds. Signed-off-by: Eric Blake <eblake@redhat.com> --- Pushing under the build-breaker rule. src/util/virdbus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util/virdbus.c b/src/util/virdbus.c index 9b0977a..4ce6c46 100644 --- a/src/util/virdbus.c +++ b/src/util/virdbus.c @@ -1,7 +1,7 @@ /* * virdbus.c: helper for using DBus * - * Copyright (C) 2012 Red Hat, Inc. + * Copyright (C) 2012-2013 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 @@ -239,7 +239,6 @@ static const char virDBusBasicTypes[] = { DBUS_TYPE_STRING, DBUS_TYPE_OBJECT_PATH, DBUS_TYPE_SIGNATURE, - DBUS_TYPE_UNIX_FD }; static bool virDBusIsBasicType(char c) { @@ -1024,6 +1023,9 @@ int virDBusMessageDecode(DBusMessage* msg, * '{' - start of a dictionary entry (pair of types) * '}' - start of a dictionary entry (pair of types) * + * At this time, there is no support for Unix fd's ('h'), which only + * newer DBus supports. + * * Passing values in variadic args for basic types is * simple, the value is just passed directly using the * corresponding C type listed against the type code -- 1.8.3.1

On Tue, Jul 23, 2013 at 05:14:20PM -0600, Eric Blake wrote:
dbus 1.2.24 (on RHEL 6) lacks DBUS_TYPE_UNIX_FD; but as we aren't trying to pass one of those anyways, we can just drop support for it in our wrapper. Solves this build error:
CC libvirt_util_la-virdbus.lo util/virdbus.c:242: error: 'DBUS_TYPE_UNIX_FD' undeclared here (not in a function)
* src/util/virdbus.c (virDBusBasicTypes): Drop support for unix fds.
Signed-off-by: Eric Blake <eblake@redhat.com> ---
Pushing under the build-breaker rule.
src/util/virdbus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/util/virdbus.c b/src/util/virdbus.c index 9b0977a..4ce6c46 100644 --- a/src/util/virdbus.c +++ b/src/util/virdbus.c @@ -1,7 +1,7 @@ /* * virdbus.c: helper for using DBus * - * Copyright (C) 2012 Red Hat, Inc. + * Copyright (C) 2012-2013 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 @@ -239,7 +239,6 @@ static const char virDBusBasicTypes[] = { DBUS_TYPE_STRING, DBUS_TYPE_OBJECT_PATH, DBUS_TYPE_SIGNATURE, - DBUS_TYPE_UNIX_FD };
static bool virDBusIsBasicType(char c) { @@ -1024,6 +1023,9 @@ int virDBusMessageDecode(DBusMessage* msg, * '{' - start of a dictionary entry (pair of types) * '}' - start of a dictionary entry (pair of types) * + * At this time, there is no support for Unix fd's ('h'), which only + * newer DBus supports. + * * Passing values in variadic args for basic types is * simple, the value is just passed directly using the * corresponding C type listed against the type code --
Ahh, ACK you beat me to the fix. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (2)
-
Daniel P. Berrange
-
Eric Blake