summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libsystemd-bus/bus-kernel.c4
-rw-r--r--src/libsystemd-bus/kdbus.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index 107b2bd694..50b28e7281 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -639,19 +639,21 @@ fail:
}
int bus_kernel_read_message(sd_bus *bus, sd_bus_message **m) {
+ uint64_t addr;
struct kdbus_msg *k;
int r;
assert(bus);
assert(m);
- r = ioctl(bus->input_fd, KDBUS_CMD_MSG_RECV, &k);
+ r = ioctl(bus->input_fd, KDBUS_CMD_MSG_RECV, &addr);
if (r < 0) {
if (errno == EAGAIN)
return 0;
return -errno;
}
+ k = UINT64_TO_PTR(addr);
r = bus_kernel_make_message(bus, k, m);
if (r <= 0)
diff --git a/src/libsystemd-bus/kdbus.h b/src/libsystemd-bus/kdbus.h
index 20b804539b..214bf51197 100644
--- a/src/libsystemd-bus/kdbus.h
+++ b/src/libsystemd-bus/kdbus.h
@@ -405,7 +405,7 @@ enum kdbus_cmd {
/* kdbus ep node commands: require connected state */
KDBUS_CMD_MSG_SEND = _IOWR(KDBUS_IOC_MAGIC, 0x40, struct kdbus_msg),
- KDBUS_CMD_MSG_RECV = _IOWR(KDBUS_IOC_MAGIC, 0x41, struct kdbus_msg *),
+ KDBUS_CMD_MSG_RECV = _IOWR(KDBUS_IOC_MAGIC, 0x41, __u64 *),
KDBUS_CMD_MSG_RELEASE = _IOWR(KDBUS_IOC_MAGIC, 0x42, struct kdbus_msg),
KDBUS_CMD_NAME_ACQUIRE = _IOWR(KDBUS_IOC_MAGIC, 0x50, struct kdbus_cmd_name),