aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2022-12-21 23:32:23 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2022-12-26 15:18:08 +0100
commitfb15cb4ce9559021d463b5cb3816d8a9eeb8f3f9 (patch)
tree1221891774cf70c89a89e38c9d9174dc77d8a4b1 /package/network
parent73dca49f355fe10d1d5e629b0df584b03a1849b3 (diff)
downloadupstream-fb15cb4ce9559021d463b5cb3816d8a9eeb8f3f9.tar.gz
upstream-fb15cb4ce9559021d463b5cb3816d8a9eeb8f3f9.tar.bz2
upstream-fb15cb4ce9559021d463b5cb3816d8a9eeb8f3f9.zip
iproute2: Fix build with GCC 12 and glibc 2.36
This fixes the detection of name_to_handle_at() when GCC 12 and glibc 2.36 are used. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/utils/iproute2/patches/320-configure-Remove-include-sys-stat.h.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/package/network/utils/iproute2/patches/320-configure-Remove-include-sys-stat.h.patch b/package/network/utils/iproute2/patches/320-configure-Remove-include-sys-stat.h.patch
new file mode 100644
index 0000000000..02bb20297d
--- /dev/null
+++ b/package/network/utils/iproute2/patches/320-configure-Remove-include-sys-stat.h.patch
@@ -0,0 +1,43 @@
+From 3a3a2f6be704c970938eb8dac4eb0118f1c2fb06 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Wed, 21 Dec 2022 23:26:28 +0100
+Subject: [PATCH iproute2 v2] configure: Remove include <sys/stat.h>
+
+The check_name_to_handle_at() function in the configure script is
+including sys/stat.h. This include fails with glibc 2.36 like this:
+````
+In file included from /linux-5.15.84/include/uapi/linux/stat.h:5,
+ from /toolchain-x86_64_gcc-12.2.0_glibc/include/bits/statx.h:31,
+ from /toolchain-x86_64_gcc-12.2.0_glibc/include/sys/stat.h:465,
+ from config.YExfMc/name_to_handle_at_test.c:3:
+/linux-5.15.84/include/uapi/linux/types.h:10:2: warning: #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders" [-Wcpp]
+ 10 | #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders"
+ | ^~~~~~~
+In file included from /linux-5.15.84/include/uapi/linux/posix_types.h:5,
+ from /linux-5.15.84/include/uapi/linux/types.h:14:
+/linux-5.15.84/include/uapi/linux/stddef.h:5:10: fatal error: linux/compiler_types.h: No such file or directory
+ 5 | #include <linux/compiler_types.h>
+ | ^~~~~~~~~~~~~~~~~~~~~~~~
+compilation terminated.
+````
+
+Just removing the include works, the manpage of name_to_handle_at() says
+only fcntl.h is needed.
+
+Fixes: c5b72cc56bf8 ("lib/fs: fix issue when {name,open}_to_handle_at() is not implemented")
+Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ configure | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/configure
++++ b/configure
+@@ -215,7 +215,6 @@ check_name_to_handle_at()
+ cat >$TMPDIR/name_to_handle_at_test.c <<EOF
+ #define _GNU_SOURCE
+ #include <sys/types.h>
+-#include <sys/stat.h>
+ #include <fcntl.h>
+ int main(int argc, char **argv)
+ {