tools/cpio: fix compilation on macOS 14
authorRobert Marko <robimarko@gmail.com>
Sat, 27 Apr 2024 11:41:11 +0000 (13:41 +0200)
committerRobert Marko <robimarko@gmail.com>
Sat, 27 Apr 2024 13:14:06 +0000 (15:14 +0200)
commit8d65f0208798625c68b019d417f964b4e609cda1
tree4ea19dd717eb8b0d76c84cbdc1cc84d03b330154
parent4a6911fe7911914eb1319d55dd0de02542a16247
tools/cpio: fix compilation on macOS 14

Current cpio 2.13 in 22.03 will fail to compile when using macOS 14 with:
gcc -DHAVE_CONFIG_H -I. -I..   -I/Volumes/OpenWrt/openwrt/staging_dir/host/include   -O2 -I/Volumes/OpenWrt/openwrt/staging_dir/host/include  -MT obstack.o -MD -MP -MF .deps/obstack.Tpo -c -o obstack.o obstack.c
obstack.c:351:31: error: incompatible function pointer types initializing 'void (*)(void) __attribute__((noreturn))' with an expression of type 'void (void)' [-Wincompatible-function-pointer-types]
__attribute_noreturn__ void (*obstack_alloc_failed_handler) (void)
                              ^
1 error generated.
make[7]: *** [Makefile:1586: obstack.o] Error 1

Backporting gnulib commit ("obstack: Fix a clang warning") fixes this.

Fixes: #15270
Signed-off-by: Robert Marko <robimarko@gmail.com>
tools/cpio/patches/002-obstack-Fix-a-clang-warning.patch [new file with mode: 0644]