Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: memfd: Use installed kernel headers search path

Use $(KHDR_INCLUDES) as lookup path for installed kernel headers rather
than using kernel headers in include/uapi from the source kernel tree
kernel headers.

Remove bogus ../../../../include/ from the search path, because
kernel source headers are not needed by those user-space selftests, and
it causes issues because -I paths are searched before -isystem paths,
and conflicts for files appearing both in kernel sources and in uapi
headers with incompatible semantics (e.g. types.h).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Mathieu Desnoyers and committed by
Shuah Khan
a24ebb49 0d7a9167

+1 -3
+1 -3
tools/testing/selftests/memfd/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 CFLAGS += -D_FILE_OFFSET_BITS=64 3 - CFLAGS += -I../../../../include/uapi/ 4 - CFLAGS += -I../../../../include/ 5 - CFLAGS += -I../../../../usr/include/ 3 + CFLAGS += $(KHDR_INCLUDES) 6 4 7 5 TEST_GEN_PROGS := memfd_test 8 6 TEST_PROGS := run_fuse_test.sh run_hugetlbfs_test.sh