From 8de2986a42ff452d2ca7f28d23ce1156be326b62 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 6 May 2016 23:41:14 -0700 Subject: tst_QDBusMarshall: make sure we compile on linked, old dbus If we're linking to libdbus-1, qdbus_symbols_p.h #includes dbus/dbus.h, which may be old and not #define the Unix FD macros. tst_QDBusMarshall had the definition for one of the macros but not the other, so add the missing second one. Change-Id: Id69569111e7d4e619e22ffff144c35edcd6f348b Reviewed-by: Frederik Gladhorn --- tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/auto/dbus') diff --git a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp index 57fd5084be..b628738fe3 100644 --- a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp +++ b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp @@ -41,6 +41,11 @@ #include #include +#ifndef DBUS_TYPE_UNIX_FD +# define DBUS_TYPE_UNIX_FD int('h') +# define DBUS_TYPE_UNIX_FD_AS_STRING "h" +#endif + static const char serviceName[] = "org.qtproject.autotests.qpong"; static const char objectPath[] = "/org/qtproject/qpong"; static const char *interfaceName = serviceName; @@ -1088,9 +1093,6 @@ static bool canSendUnixFd(DBusConnection *connection) can_send_type = (can_send_type_t)qdbus_resolve_conditionally("dbus_connection_can_send_type"); #endif -#ifndef DBUS_TYPE_UNIX_FD -# define DBUS_TYPE_UNIX_FD int('h') -#endif return can_send_type && can_send_type(connection, DBUS_TYPE_UNIX_FD); } -- cgit v1.2.3