nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 46 lines 1.7 kB view raw
1From 8be51b7c3520fd2dbd1ba2e917a499c90822817f Mon Sep 17 00:00:00 2001 2From: Alyssa Ross <hi@alyssa.is> 3Date: Tue, 27 Jan 2026 10:46:19 +0100 4Subject: [PATCH] Fix build for musl 5MIME-Version: 1.0 6Content-Type: text/plain; charset=UTF-8 7Content-Transfer-Encoding: 8bit 8 9musl's struct msghdr includes padding members, so using undesignated 10initializers as was previously being done ended up initializing the 11wrong members: 12 13 gcc -O -D_GNU_SOURCE -Wall -Wno-parentheses -DHAVE_CONFIG_H -I. -I. -c -o xio-netlink.o xio-netlink.c 14 xio-netlink.c: In function ‘xio_netlink_mtu’: 15 xio-netlink.c:33:59: error: initialization of ‘int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] 16 33 | ct msghdr rtmsg = { &sa, sizeof(sa), &iov, 1, NULL, 0, 0 }; 17 | ^~~~ 18 xio-netlink.c:33:59: note: (near initialization for ‘rtmsg.__pad1’) 19 make: *** [<builtin>: xio-netlink.o] Error 1 20--- 21 xio-netlink.c | 7 ++++++- 22 1 file changed, 6 insertions(+), 1 deletion(-) 23 24diff --git a/xio-netlink.c b/xio-netlink.c 25index 533d78c..b0c5c3c 100644 26--- a/xio-netlink.c 27+++ b/xio-netlink.c 28@@ -30,7 +30,12 @@ int xio_netlink_mtu( 29 struct nlmsghdr buf[8192/sizeof(struct nlmsghdr)]; 30 struct iovec iov = { buf, sizeof(buf) }; 31 struct sockaddr_nl sa; 32- struct msghdr rtmsg = { &sa, sizeof(sa), &iov, 1, NULL, 0, 0 }; 33+ struct msghdr rtmsg = { 34+ .msg_name = &sa, 35+ .msg_namelen = sizeof(sa), 36+ .msg_iov = &iov, 37+ .msg_iovlen = 1, 38+ }; 39 struct nlmsghdr *nh; 40 41 Info2("Setting interface %d MTU to %u using netlink", interface_index, mtu); 42 43base-commit: 8834d6cc7e0d7b04cd31f9f7d0cb3e06913b0323 44-- 452.52.0 46