From: Mathieu Desnoyers Date: Fri, 27 Jan 2023 13:57:31 +0000 (-0500) Subject: selftests: gpio: Fix incorrect kernel headers search path X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8bb9c1808628babcc7b99ec2439bf102379bd4ac;p=linux.git selftests: gpio: Fix incorrect kernel headers search path 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 --- diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile index 616ed40196554..e0884390447dc 100644 --- a/tools/testing/selftests/gpio/Makefile +++ b/tools/testing/selftests/gpio/Makefile @@ -3,6 +3,6 @@ TEST_PROGS := gpio-mockup.sh gpio-sim.sh TEST_FILES := gpio-mockup-sysfs.sh TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev gpio-chip-info gpio-line-name -CFLAGS += -O2 -g -Wall -I../../../../usr/include/ $(KHDR_INCLUDES) +CFLAGS += -O2 -g -Wall $(KHDR_INCLUDES) include ../lib.mk