From: Andreas Schneider Date: Fri, 3 Feb 2023 14:27:22 +0000 (+0100) Subject: s4:modules: Move structs with dynamic arrays to end of struct X-Git-Tag: talloc-2.4.1~1691 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c462a0b78da674514a70896fbb6f08295808015b;p=thirdparty%2Fsamba.git s4:modules: Move structs with dynamic arrays to end of struct source3/modules/vfs_io_uring.c:70:22: error: field 'cqe' with variable sized type 'struct io_uring_cqe' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] struct io_uring_cqe cqe; ^ Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_io_uring.c b/source3/modules/vfs_io_uring.c index 65dd151bb02..b33c09a6ef8 100644 --- a/source3/modules/vfs_io_uring.c +++ b/source3/modules/vfs_io_uring.c @@ -66,13 +66,13 @@ struct vfs_io_uring_request { struct vfs_io_uring_request **list_head; struct vfs_io_uring_config *config; struct tevent_req *req; - struct io_uring_sqe sqe; - struct io_uring_cqe cqe; void (*completion_fn)(struct vfs_io_uring_request *cur, const char *location); struct timespec start_time; struct timespec end_time; SMBPROFILE_BYTES_ASYNC_STATE(profile_bytes); + struct io_uring_sqe sqe; + struct io_uring_cqe cqe; }; static void vfs_io_uring_finish_req(struct vfs_io_uring_request *cur, @@ -417,11 +417,11 @@ static void vfs_io_uring_fd_handler(struct tevent_context *ev, } struct vfs_io_uring_pread_state { - struct vfs_io_uring_request ur; struct files_struct *fsp; off_t offset; struct iovec iov; size_t nread; + struct vfs_io_uring_request ur; }; static void vfs_io_uring_pread_submit(struct vfs_io_uring_pread_state *state); @@ -565,11 +565,11 @@ static ssize_t vfs_io_uring_pread_recv(struct tevent_req *req, } struct vfs_io_uring_pwrite_state { - struct vfs_io_uring_request ur; struct files_struct *fsp; off_t offset; struct iovec iov; size_t nwritten; + struct vfs_io_uring_request ur; }; static void vfs_io_uring_pwrite_submit(struct vfs_io_uring_pwrite_state *state);