From: Mathieu Desnoyers Date: Fri, 27 Jan 2023 13:57:45 +0000 (-0500) Subject: selftests: sched: Fix incorrect kernel headers search path X-Git-Tag: v6.1.16~141 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3005b26951756ce8973b383aaba6099fcf54ebfd;p=users%2Fdwmw2%2Flinux.git selftests: sched: Fix incorrect kernel headers search path commit 0d2cace5af50806a6b32ab73d367b80e46acda0f upstream. Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman --- diff --git a/tools/testing/selftests/sched/Makefile b/tools/testing/selftests/sched/Makefile index 10c72f14fea9d..099ee9213557a 100644 --- a/tools/testing/selftests/sched/Makefile +++ b/tools/testing/selftests/sched/Makefile @@ -4,7 +4,7 @@ ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) CLANG_FLAGS += -no-integrated-as endif -CFLAGS += -O2 -Wall -g -I./ -I../../../../usr/include/ -Wl,-rpath=./ \ +CFLAGS += -O2 -Wall -g -I./ $(KHDR_INCLUDES) -Wl,-rpath=./ \ $(CLANG_FLAGS) LDLIBS += -lpthread