Skip to content

Commit f63731e

Browse files
warthog618brgl
authored andcommitted
selftests: gpio: fix include path to kernel headers for out of tree builds
When building selftests out of the kernel tree the gpio.h the include path is incorrect and the build falls back to the system includes which may be outdated. Add the KHDR_INCLUDES to the CFLAGS to include the gpio.h from the build tree. Fixes: 4f4d0af ("selftests: gpio: restore CFLAGS options") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
1 parent b8c768c commit f63731e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/gpio/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
TEST_PROGS := gpio-mockup.sh gpio-sim.sh
44
TEST_FILES := gpio-mockup-sysfs.sh
55
TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev gpio-chip-info gpio-line-name
6-
CFLAGS += -O2 -g -Wall -I../../../../usr/include/
6+
CFLAGS += -O2 -g -Wall -I../../../../usr/include/ $(KHDR_INCLUDES)
77

88
include ../lib.mk

0 commit comments

Comments
 (0)