netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] libnetlink.h: Include <endian.h> explicitly for musl
@ 2024-08-04 14:57 Andreas K. Hüttel
  2024-08-04 15:55 ` Stephen Hemminger
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas K. Hüttel @ 2024-08-04 14:57 UTC (permalink / raw)
  To: stephen, netdev; +Cc: base-system, Andreas K. Hüttel

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(+)

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>
-- 
2.44.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-08-04 17:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-04 14:57 [PATCH iproute2] libnetlink.h: Include <endian.h> explicitly for musl Andreas K. Hüttel
2024-08-04 15:55 ` Stephen Hemminger
2024-08-04 16:03   ` [PATCH v2 " Andreas K. Hüttel
2024-08-04 16:58     ` Stephen Hemminger
2024-08-04 17:07       ` Mike Gilbert
2024-08-04 17:09         ` Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).