libnetlink.h: Add <endian.h> for htobe64
Subsystems (2)
PATCH 1/2 libnetlink.h: Add <endian.h> for htobe64
Required to build on musl (1.2.5)
Signed-off-by Haelwenn (lanodan) Monnier <[email protected]>
--- include/libnetlink.h | 1 + 1 file changed, 1 insertion(+)
include/libnetlink.h +1 -0
@@ -3,6 +3,7 @@#define __LIBNETLINK_H__ 1#include <stdio.h> +#include <endian.h> #include <string.h> #include <asm/types.h> #include <linux/netlink.h>
Signature · 1 line
2.44.2
PATCH 2/2 arpd.c: Use names for struct msghdr initialisation
Fixes the following compiler error which is due to padding elements being present in musl (1.2.5), thankfully the struct element names are part of POSIX.
arpd.c:442:3: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion]
442 | NULL, 0,
| ^~~~Signed-off-by Haelwenn (lanodan) Monnier <[email protected]>
--- misc/arpd.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
misc/arpd.c +7 -4
@@ -437,10 +437,13 @@ static void get_kern_msg(void)struct iovec iov;char buf[8192 ];struct msghdr msg = { - (void *)&nladdr,sizeof (nladdr), - &iov,1 , -NULL ,0 , -0 + .msg_name = (void *)&nladdr, + .msg_namelen =sizeof (nladdr), + .msg_iov = &iov, + .msg_iovlen =1 , + .msg_control =NULL , + .msg_controllen =0 , + .msg_flags =0 }; iov.iov_base = buf;
Signature · 1 line
2.44.2
Quoted 6 lines · Haelwenn (lanodan) Monnier
Required to build on musl (1.2.5)
Signed-off-by Haelwenn (lanodan) Monnier <[email protected]>--- include/libnetlink.h | 1 + 1 file changed, 1 insertion(+)
Reviewed-by Alyssa Ross <[email protected]>
Quoted 15 lines
include/libnetlink.h +1
-1@@ -3,6 +3,7 @@#define __LIBNETLINK_H__ 1#include <stdio.h> +#include <endian.h> #include <string.h> #include <asm/types.h> #include <linux/netlink.h> --2.44.2