1
0
Fork 0
forked from mirror/openwrt
openwrt/package
Jonas Gorski d015a39dd3 iproute2: point KERNEL_INCLUDE to toolchain headers
Glibc since 2.41 tries to include linux/sched/types.h from sched.h, and
pointing KERNEL_INCLUDE to the kernel headers makes it use
linux/sched/types.h from the kernel headers instead of the installed
one.

This then breaks the configure (test) compile for setns() and the test:

mips-openwrt-linux-gnu-gcc -I/fork.openwrt/build_dir/target-mips_24kc_glibc/linux-ath79_generic/linux-6.6.93/include/uapi -o config.HaAJYe/setnstest config.HaAJYe/setnstest.c
In file included from /fork.openwrt/build_dir/target-mips_24kc_glibc/linux-ath79_generic/linux-6.6.93/include/uapi/linux/sched/types.h:5,
                 from /fork.openwrt/staging_dir/toolchain-mips_24kc_gcc-14.3.0_glibc/include/bits/sched.h:63,
                 from /fork.openwrt/staging_dir/toolchain-mips_24kc_gcc-14.3.0_glibc/include/sched.h:43,
                 from config.HaAJYe/setnstest.c:2:
/fork.openwrt/build_dir/target-mips_24kc_glibc/linux-ath79_generic/linux-6.6.93/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 /fork.openwrt/build_dir/target-mips_24kc_glibc/linux-ath79_generic/linux-6.6.93/include/uapi/linux/posix_types.h:5,
                 from /fork.openwrt/build_dir/target-mips_24kc_glibc/linux-ath79_generic/linux-6.6.93/include/uapi/linux/types.h:14:
/fork.openwrt/build_dir/target-mips_24kc_glibc/linux-ath79_generic/linux-6.6.93/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.

Fix this by pointing KERNEL_INCLUDE to the toolchain headers, which
include the installed kernel headers.

Tested with musl, glibc, and SDK.

Fixes: 60738feded ("iproute2: Fix KERNEL_INCLUDE in SDK")
Reported-by: Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2025-06-18 10:46:35 +02:00
..
base-files sysupgrade: create 10_disable_services w/ fixed modified time 2025-05-31 11:18:50 -06:00
boot sunxi: add support for OrangePi Zero 2W 2025-06-16 23:10:54 +02:00
devel perf: disable slang support 2025-06-16 23:22:59 +02:00
firmware linux-firmware: update to 20250613 2025-06-14 09:39:09 +02:00
kernel wifi: ath11k: increase max ATH11K_QMI_CALDB_SIZE macro 2025-06-13 10:29:50 +02:00
libs gmp: fix compilation with GCC 15.1 2025-06-08 12:46:17 +02:00
network iproute2: point KERNEL_INCLUDE to toolchain headers 2025-06-18 10:46:35 +02:00
system apk-tools: update to git HEAD (2025-06-06) 2025-06-11 10:41:01 +02:00
utils ucode-mod-bpf: switch to ucv_resource_create_ex 2025-06-13 10:16:06 +02:00
Makefile package: rework contents of package index.json 2025-06-11 16:55:31 +02:00