Fixes following clang-9 compiler warnings:
ubusd.c:99:18: error: field 'h' with variable sized type 'struct cmsghdr' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
struct cmsghdr h;
^
Signed-off-by: Petr Štetiar <ynezz@true.cz>
static int writev_retry(int fd, struct iovec *iov, int iov_len, int sock_fd)
{
static struct {
- struct cmsghdr h;
int fd;
+ struct cmsghdr h;
} fd_buf = {
.h = {
.cmsg_len = sizeof(fd_buf),
int bytes, total = 0;
int fd = ctx->sock.fd;
static struct {
- struct cmsghdr h;
int fd;
+ struct cmsghdr h;
} fd_buf = {
.h = {
.cmsg_type = SCM_RIGHTS,
{
static struct iovec iov[2];
static struct {
- struct cmsghdr h;
int fd;
+ struct cmsghdr h;
} fd_buf = {
.h = {
.cmsg_len = sizeof(fd_buf),
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,