selftests:mm: mremap_dontunmap build failed with clang-16 due to below warnings / errors on Linux next-20230725 ( or older kernels ).
Reported-by: Linux Kernel Functional Testing lkft@linaro.org
clang --target=aarch64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -Werror=option-ignored -Werror=unused-command-line-argument --target=aarch64-linux-gnu -fintegrated-as -Wall -I tools/testing/selftests/../../.. -isystem /home/tuxbuild/.cache/tuxmake/builds/1/build/usr/include mremap_dontunmap.c vm_util.c -lrt -lpthread -o /home/tuxbuild/.cache/tuxmake/builds/1/build/kselftest/mm/mremap_dontunmap mremap_dontunmap.c:53:6: error: use of undeclared identifier 'MREMAP_DONTUNMAP' MREMAP_DONTUNMAP | MREMAP_MAYMOVE, 0); ^ mremap_dontunmap.c:108:6: error: use of undeclared identifier 'MREMAP_DONTUNMAP' MREMAP_DONTUNMAP | MREMAP_MAYMOVE, NULL); ^ mremap_dontunmap.c:149:6: error: use of undeclared identifier 'MREMAP_DONTUNMAP' MREMAP_DONTUNMAP | MREMAP_MAYMOVE, NULL); ^ mremap_dontunmap.c:200:21: error: use of undeclared identifier 'MREMAP_DONTUNMAP' MREMAP_FIXED | MREMAP_DONTUNMAP | MREMAP_MAYMOVE, ^ mremap_dontunmap.c:252:6: error: use of undeclared identifier 'MREMAP_DONTUNMAP' MREMAP_DONTUNMAP | MREMAP_MAYMOVE, NULL); ^ mremap_dontunmap.c:310:6: error: use of undeclared identifier 'MREMAP_DONTUNMAP' MREMAP_DONTUNMAP | MREMAP_MAYMOVE | MREMAP_FIXED, dest_mapping); ^ 6 errors generated. make[4]: Leaving directory 'tools/testing/selftests/mm'
Links: - https://storage.tuxsuite.com/public/linaro/lkft/builds/2T3676HpK243gMBLYJCp4...
steps to reproduce: - https://storage.tuxsuite.com/public/linaro/lkft/builds/2T3676HpK243gMBLYJCp4...
-- Linaro LKFT https://lkft.linaro.org