diff mbox series

[iproute2] libnetlink.h: Include <endian.h> explicitly for musl

Message ID 20240804145809.936544-1-dilfridge@gentoo.org (mailing list archive)
State Superseded
Delegated to: Stephen Hemminger
Headers show
Series [iproute2] libnetlink.h: Include <endian.h> explicitly for musl | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Andreas K. Hüttel Aug. 4, 2024, 2:57 p.m. UTC
The code added in 976dca372 uses h2be64, defined in endian.h.
While this is pulled in around some corners for glibc (see
below), that's not the case for musl and an explicit include
is required.

. /usr/include/libmnl/libmnl.h
.. /usr/include/sys/socket.h
... /usr/include/bits/socket.h
.... /usr/include/sys/types.h
..... /usr/include/endian.h

Bug: https://bugs.gentoo.org/936234
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
This time also to the netdev list, sorry...
---
 include/libnetlink.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Stephen Hemminger Aug. 4, 2024, 3:55 p.m. UTC | #1
On Sun,  4 Aug 2024 16:57:46 +0200
Andreas K. Hüttel <dilfridge@gentoo.org> wrote:

> The code added in 976dca372 uses h2be64, defined in endian.h.
> While this is pulled in around some corners for glibc (see
> below), that's not the case for musl and an explicit include
> is required.
> 
> . /usr/include/libmnl/libmnl.h
> .. /usr/include/sys/socket.h
> ... /usr/include/bits/socket.h
> .... /usr/include/sys/types.h
> ..... /usr/include/endian.h
> 
> Bug: https://bugs.gentoo.org/936234
> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
> ---

The commit message needs to be reworded.
Should use fixes tag than a specific commit hash value.
diff mbox series

Patch

diff --git a/include/libnetlink.h b/include/libnetlink.h
index 30f0c2d2..7074e913 100644
--- a/include/libnetlink.h
+++ b/include/libnetlink.h
@@ -4,6 +4,7 @@ 
 
 #include <stdio.h>
 #include <string.h>
+#include <endian.h>
 #include <asm/types.h>
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>