[PATCH] iproute2: fix build with a newer toolchain

Rui Salvaterra rsalvaterra at gmail.com
Wed Mar 3 20:48:50 GMT 2021


GCC 10.2.0 complains loudly of missing limits.h. Add a patch to fix this.

Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 .../050-fix-build-include-limits.patch        | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 package/network/utils/iproute2/patches/050-fix-build-include-limits.patch

diff --git a/package/network/utils/iproute2/patches/050-fix-build-include-limits.patch b/package/network/utils/iproute2/patches/050-fix-build-include-limits.patch
new file mode 100644
index 0000000000..df7d9a0fb7
--- /dev/null
+++ b/package/network/utils/iproute2/patches/050-fix-build-include-limits.patch
@@ -0,0 +1,23 @@
+--- a/lib/bpf_glue.c
++++ b/lib/bpf_glue.c
+@@ -4,6 +4,9 @@
+  * Authors:	Hangbin Liu <haliu at redhat.com>
+  *
+  */
++
++#include <limits.h>
++
+ #include "bpf_util.h"
+ #ifdef HAVE_LIBBPF
+ #include <bpf/bpf.h>
+--- a/lib/bpf_libbpf.c
++++ b/lib/bpf_libbpf.c
+@@ -5,6 +5,8 @@
+  *
+  */
+ 
++#include <limits.h>
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
-- 
2.30.1




More information about the openwrt-devel mailing list