ubusd/libubus-io: fix variable sized struct position warning
[project/ubus.git] / ubusd.c
diff --git a/ubusd.c b/ubusd.c
index 7738f50f97797623d01f4aed8258ac10102f8a63..d6a72e73370bde85c66516fdd023a81b13475e3b 100644 (file)
--- a/ubusd.c
+++ b/ubusd.c
@@ -96,8 +96,8 @@ static int ubus_msg_writev(int fd, struct ubus_msg_buf *ub, int offset)
 {
        static struct iovec iov[2];
        static struct {
-               struct cmsghdr h;
                int fd;
+               struct cmsghdr h;
        } fd_buf = {
                .h = {
                        .cmsg_len = sizeof(fd_buf),
@@ -216,8 +216,8 @@ static void client_cb(struct uloop_fd *sock, unsigned int events)
        struct ubus_msg_buf *ub;
        static struct iovec iov;
        static struct {
-               struct cmsghdr h;
                int fd;
+               struct cmsghdr h;
        } fd_buf = {
                .h = {
                        .cmsg_type = SCM_RIGHTS,