mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-21 09:05:28 +04:00
Linux 6.18 made migrate_disable()/migrate_enable() inline in linux/sched.h. They use RQ_nr_pinned from include/generated/rq-offsets.h, which the kernel only generates during 'make prepare'. bpf-headers only runs archprepare, so the header is missing and BPF programs including linux/sched.h fail to build. Running 'prepare' instead is not an option: it compiles kernel objects (scripts/mod, bounds.c, asm-offsets.c, rq-offsets.c) with the BPF clang using the MIPS kernel flags, which fails right away. Generate a placeholder header, as is already done for timeconst.h. The offset value is irrelevant for BPF programs, which cannot call these functions. Signed-off-by: Sander van Deijck <sander@vandeijck.com> Link: https://github.com/openwrt/openwrt/pull/25964 Signed-off-by: Robert Marko <robimarko@gmail.com>