Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux/modules/mmap_file: define the backward compatibility macro even…
… when !CONFIG_DEBUG_FS Building on Alpine 3.4 fails: make -C /lib/modules/4.4.68-0-grsec/build M=/shared/linux/modules modules CC [M] /shared/linux/modules/mmap_file.o /shared/linux/modules/mmap_file.c: In function 'mmap_file_init': /shared/linux/modules/mmap_file.c:196:17: error: implicit declaration of function 'debugfs_create_file_unsafe' [-Werror=implicit-function-declaration] debugfs_file = debugfs_create_file_unsafe(debugname, 0644, NULL, NULL, &mmap_file_fops); ^ /shared/linux/modules/mmap_file.c:196:15: error: assignment makes pointer from integer without a cast [-Werror=int-conversion] debugfs_file = debugfs_create_file_unsafe(debugname, 0644, NULL, NULL, &mmap_file_fops); ^ cc1: all warnings being treated as errors scripts/Makefile.build:264: recipe for target '/shared/linux/modules/mmap_file.o' failed Fix this by mapping map debugfs_create_file_unsafe to debugfs_create_file on Linux<4.14 when CONFIG_DEBUG_FS is unset. Unfortunately the versions mismatch because there was a bug fixed by https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c2a737eb2ea5682ffe63bc08003965496d6dc088 Fixes: 4c3ea5c ("linux/modules/mmap_file: invert the macro defining debugfs_create_file for Linux 6.13 compatibility")
- Loading branch information