37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From: Olaf Kirch <okir@suse.de>
|
|
Date: Date: Wed, 12 Mar 2014 13:52:50 +0000
|
|
Subject: [PATCH] systemd big endian reply matching
|
|
|
|
Reply matching on big endian architectures is broken in the dbus code.
|
|
|
|
The hashmap functions, which are used to store and retrieves the reply_callback
|
|
structures of asynchronous calls, take a uint64_t pointer for the key argument.
|
|
However, the reply_cookie of the sd_bus_message is stored in a 32bit variable.
|
|
|
|
This works nicely on x86-64, because (a) it's little endian, and (b) the struct
|
|
is padded to the next 8 byte boundary because reply_cookie is wedged between
|
|
two pointers.
|
|
|
|
On s390x, this fails badly thanks to being big endian.
|
|
|
|
Unfortunately, this results in complete failure of any communication
|
|
between systemd daemons and the dbus-daemon, because it never gets
|
|
past the initial Hello handshake - which is sent as an asynchronous
|
|
message.
|
|
|
|
Signed-off-by: Olaf Kirch <okir@suse.de>
|
|
|
|
Index: systemd-210/src/libsystemd/sd-bus/bus-message.h
|
|
===================================================================
|
|
--- systemd-210/src/libsystemd/sd-bus/bus-message.h
|
|
+++ systemd-210/src/libsystemd/sd-bus/bus-message.h
|
|
@@ -84,7 +84,7 @@ struct sd_bus_message {
|
|
|
|
sd_bus *bus;
|
|
|
|
- uint32_t reply_cookie;
|
|
+ uint64_t reply_cookie;
|
|
|
|
const char *path;
|
|
const char *interface;
|