kernel: fix x86 compilation on macOS
authorRobert Marko <robimarko@gmail.com>
Mon, 8 Jul 2024 07:46:02 +0000 (09:46 +0200)
committerRobert Marko <robimarko@gmail.com>
Mon, 8 Jul 2024 10:43:50 +0000 (12:43 +0200)
commitdbb669872173237612d4f39aa2f742620da6bd57
tree4a6b7d6fc6dd479b01cbb15ecf7f3543211d7f34
parentd7a76fc351f7c33292202dedd4f9ab48b698212a
kernel: fix x86 compilation on macOS

Trying to compile x86 or x86_64 on macOS will fail with:
openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.36/tools/include/linux/rbtree.h:21:10: fatal error: 'linux/stddef.h' file not found

After some digging, it seems that we dropped the old 212-tools_portability
patch when 6.6 x86 support was added, then Felix added back some parts of
it in ("kernel: fix tools build breakage on macos with x86") but trying to
build x86 kernels will still fail.

So, lets add more of the required changes from the 212-tools_portability
patch so that x86 kernels build on macOS.

Fixes: 69b145188f1a ("generic: 6.6: Removal of tools_portability.patch already included in kernel 6.6")
Link: https://github.com/openwrt/openwrt/pull/15904
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/generic/hack-6.6/200-tools_portability.patch