summaryrefslogtreecommitdiff
path: root/libubus.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-10-29 17:28:33 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-10-29 17:28:37 +0100
commita9ee3ef0cf20d8a7a807d46db4dfa48e072cca51 (patch)
treed80a840e74dd8a191a786ea3c06a872858c798d8 /libubus.h
parent6ae17d0298a8f1c24f16a68c8d1884091fb5c39f (diff)
downloadubus-a9ee3ef0cf20d8a7a807d46db4dfa48e072cca51.tar.gz
libubus: pull the variable length data array out of struct ubus_msghdr to fix builds with clang
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'libubus.h')
-rw-r--r--libubus.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libubus.h b/libubus.h
index 08f9c5b..f899ded 100644
--- a/libubus.h
+++ b/libubus.h
@@ -34,6 +34,12 @@ struct ubus_event_handler;
struct ubus_subscriber;
struct ubus_notify_request;
+static inline struct blob_attr *
+ubus_msghdr_data(struct ubus_msghdr *hdr)
+{
+ return (struct blob_attr *) (hdr + 1);
+}
+
typedef void (*ubus_lookup_handler_t)(struct ubus_context *ctx,
struct ubus_object_data *obj,
void *priv);