wsdd2: fix compilation with GCC14 and 64-bit
authorRosen Penev <rosenp@gmail.com>
Sun, 2 Jun 2024 00:31:48 +0000 (17:31 -0700)
committerRosen Penev <rosenp@gmail.com>
Sun, 2 Jun 2024 03:58:26 +0000 (20:58 -0700)
struct msghdr under musl uses padding ints for 64-bit, which means we
can't direct initialize like this. Switch to initializing each member
explicitly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
net/wsdd2/Makefile
net/wsdd2/patches/010-gcc14.patch [new file with mode: 0644]

index 02ce268774c23e2e978a5711a06a5c39e7cadd7d..7fde40c391912d85935c5f0885c12983427cf822 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wsdd2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/Netgear/wsdd2.git
diff --git a/net/wsdd2/patches/010-gcc14.patch b/net/wsdd2/patches/010-gcc14.patch
new file mode 100644 (file)
index 0000000..cc17e47
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/wsdd2.c
++++ b/wsdd2.c
+@@ -543,7 +543,15 @@ static int netlink_recv(struct endpoint
+       char buf[PAGE_SIZE];
+       struct sockaddr_nl sa;
+       struct iovec iov = { buf, sizeof buf };
+-      struct msghdr msg = { &sa, sizeof sa, &iov, 1, NULL, 0, 0 };
++      struct msghdr msg = {
++              .msg_name = &sa,
++              .msg_namelen = sizeof(sa),
++              .msg_iov = &iov,
++              .msg_iovlen = 1,
++              .msg_control = NULL,
++              .msg_controllen = 0,
++              .msg_flags = 0,
++      };
+       ssize_t msglen = recvmsg(ep->sock, &msg, 0);
+       DEBUG(2, W, "%s: %zd bytes", __func__, msglen);