Commit 8de2986a authored by Thiago Macieira's avatar Thiago Macieira
Browse files

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: default avatarFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Showing with 5 additions and 3 deletions
......@@ -41,6 +41,11 @@
#include <QtDBus/private/qdbusconnection_p.h>
#include <QtDBus/private/qdbus_symbols_p.h>
#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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment