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

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: 4f4d0af7b2d9 ("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>

authored by

Kent Gibson and committed by
Bartosz Golaszewski
f63731e1 b8c768cc

+1 -1
+1 -1
tools/testing/selftests/gpio/Makefile
··· 3 3 TEST_PROGS := gpio-mockup.sh gpio-sim.sh 4 4 TEST_FILES := gpio-mockup-sysfs.sh 5 5 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) 7 7 8 8 include ../lib.mk