lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240514063811.383371-1-brahmajit.xyz@gmail.com>
Date: Tue, 14 May 2024 06:35:37 +0000
From: Brahmajit Das <brahmajit.xyz@...il.com>
To: netdev@...r.kernel.org
Subject: [PATCH 1/1] Fix implicit declaration of function 'htobe64' in gcc 14 on musl systems

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@...il.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ