[openwrt/openwrt] iproute2: fix tc-tiny build failure
LEDE Commits
lede-commits at lists.infradead.org
Sat Oct 5 18:45:12 PDT 2024
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/685fa051d5608bbb2888a04b6e4474faca093cca
commit 685fa051d5608bbb2888a04b6e4474faca093cca
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Sat Oct 5 20:34:17 2024 +0100
iproute2: fix tc-tiny build failure
htobe64 usage requires including endian.h, otherwise tc-tiny fails to build.
Fixes: 626236638197 ("iproute2: update to 6.11.0")
Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16609
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
...libnetlink-fix-build-with-musl-and-gcc-14.patch | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/package/network/utils/iproute2/patches/012-libnetlink-fix-build-with-musl-and-gcc-14.patch b/package/network/utils/iproute2/patches/012-libnetlink-fix-build-with-musl-and-gcc-14.patch
new file mode 100644
index 0000000000..749176a8de
--- /dev/null
+++ b/package/network/utils/iproute2/patches/012-libnetlink-fix-build-with-musl-and-gcc-14.patch
@@ -0,0 +1,28 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa at alpinelinux.org>
+Date: Thu, 8 Aug 2024 09:19:01 +0200
+Subject: libnetlink: fix build with musl and gcc 14
+
+Fixes compilation error with musl libc and gcc 14:
+
+../include/libnetlink.h: In function 'rta_getattr_be64':
+../include/libnetlink.h:280:16: error: implicit declaration of function 'htobe64' [-Wimplicit-function-declaration]
+ 280 | return htobe64(rta_getattr_u64(rta));
+ | ^~~~~~~
+
+Reference: https://man7.org/linux/man-pages/man3/endian.3.html
+Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
+---
+ include/libnetlink.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/libnetlink.h
++++ b/include/libnetlink.h
+@@ -2,6 +2,7 @@
+ #ifndef __LIBNETLINK_H__
+ #define __LIBNETLINK_H__ 1
+
++#include <endian.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <asm/types.h>
More information about the lede-commits
mailing list