* [PATCH 1/1] Fix implicit declaration of function 'htobe64' in gcc 14 on musl systems
@ 2024-05-14 6:35 Brahmajit Das
2024-05-14 15:43 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Brahmajit Das @ 2024-05-14 6:35 UTC (permalink / raw)
To: netdev
On musl systems with GCC 14 and above, the htobe64 function cannot be
found by default. From the man page[0], the function is from endian.h
header file. If the file is not included in, then we get the following
error message. The issue however cannot be reproduced on glibc systems.
In file included from ../include/libgenl.h:5,
from libgenl.c:12:
../include/libnetlink.h: In function 'rta_getattr_be64':
../include/libnetlink.h:281:16: error: implicit declaration of function 'htobe64' [-Wimplicit-function-declaration]
281 | return htobe64(rta_getattr_u64(rta));
| ^~~~~~~
make[1]: *** [../config.include:24: libgenl.o] Error 1
[0]: https://linux.die.net/man/3/htobe64
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
---
include/libnetlink.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/libnetlink.h b/include/libnetlink.h
index 30f0c2d2..77e81815 100644
--- a/include/libnetlink.h
+++ b/include/libnetlink.h
@@ -12,6 +12,7 @@
#include <linux/neighbour.h>
#include <linux/netconf.h>
#include <arpa/inet.h>
+#include <endian.h>
struct rtnl_handle {
int fd;
--
2.45.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] Fix implicit declaration of function 'htobe64' in gcc 14 on musl systems
2024-05-14 6:35 [PATCH 1/1] Fix implicit declaration of function 'htobe64' in gcc 14 on musl systems Brahmajit Das
@ 2024-05-14 15:43 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2024-05-14 15:43 UTC (permalink / raw)
To: Brahmajit Das; +Cc: netdev
On Tue, 14 May 2024 06:35:37 +0000
Brahmajit Das <brahmajit.xyz@gmail.com> wrote:
> On musl systems with GCC 14 and above, the htobe64 function cannot be
> found by default. From the man page[0], the function is from endian.h
> header file. If the file is not included in, then we get the following
> error message. The issue however cannot be reproduced on glibc systems.
>
> In file included from ../include/libgenl.h:5,
> from libgenl.c:12:
> ../include/libnetlink.h: In function 'rta_getattr_be64':
> ../include/libnetlink.h:281:16: error: implicit declaration of function 'htobe64' [-Wimplicit-function-declaration]
> 281 | return htobe64(rta_getattr_u64(rta));
> | ^~~~~~~
> make[1]: *** [../config.include:24: libgenl.o] Error 1
>
> [0]: https://linux.die.net/man/3/htobe64
>
> Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Fixes: 976dca372e4c ("f_flower: implement pfcp opts")
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-14 15:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-14 6:35 [PATCH 1/1] Fix implicit declaration of function 'htobe64' in gcc 14 on musl systems Brahmajit Das
2024-05-14 15:43 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox