}
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)
/* 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),