diff options
author | Kay Sievers <kay@vrfy.org> | 2013-05-17 23:25:31 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2013-05-17 23:26:28 +0200 |
commit | 16af1d3922e1382c26b1beba38ddb22581c49f3b (patch) | |
tree | ef4be8b70a7befeeea49e75484c46b0969fa90a0 /src/libsystemd-bus | |
parent | 2b3e18de74ca89b374dd4f7a2c30e5731d347841 (diff) |
bus: do not pass a pointer but a uint64_t address in RECV
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r-- | src/libsystemd-bus/bus-kernel.c | 4 | ||||
-rw-r--r-- | src/libsystemd-bus/kdbus.h | 2 |
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), |