ethtool: update to 6.2
[openwrt/staging/wigyori.git] / package / network / utils / iproute2 / patches / 320-configure-Remove-include-sys-stat.h.patch
1 From 3a3a2f6be704c970938eb8dac4eb0118f1c2fb06 Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Wed, 21 Dec 2022 23:26:28 +0100
4 Subject: [PATCH iproute2 v2] configure: Remove include <sys/stat.h>
5
6 The check_name_to_handle_at() function in the configure script is
7 including sys/stat.h. This include fails with glibc 2.36 like this:
8 ````
9 In file included from /linux-5.15.84/include/uapi/linux/stat.h:5,
10 from /toolchain-x86_64_gcc-12.2.0_glibc/include/bits/statx.h:31,
11 from /toolchain-x86_64_gcc-12.2.0_glibc/include/sys/stat.h:465,
12 from config.YExfMc/name_to_handle_at_test.c:3:
13 /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]
14 10 | #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders"
15 | ^~~~~~~
16 In file included from /linux-5.15.84/include/uapi/linux/posix_types.h:5,
17 from /linux-5.15.84/include/uapi/linux/types.h:14:
18 /linux-5.15.84/include/uapi/linux/stddef.h:5:10: fatal error: linux/compiler_types.h: No such file or directory
19 5 | #include <linux/compiler_types.h>
20 | ^~~~~~~~~~~~~~~~~~~~~~~~
21 compilation terminated.
22 ````
23
24 Just removing the include works, the manpage of name_to_handle_at() says
25 only fcntl.h is needed.
26
27 Fixes: c5b72cc56bf8 ("lib/fs: fix issue when {name,open}_to_handle_at() is not implemented")
28 Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
29 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
30 ---
31 configure | 1 -
32 1 file changed, 1 deletion(-)
33
34 --- a/configure
35 +++ b/configure
36 @@ -215,7 +215,6 @@ check_name_to_handle_at()
37 cat >$TMPDIR/name_to_handle_at_test.c <<EOF
38 #define _GNU_SOURCE
39 #include <sys/types.h>
40 -#include <sys/stat.h>
41 #include <fcntl.h>
42 int main(int argc, char **argv)
43 {