From: Mathieu Desnoyers Date: Fri, 27 Jan 2023 13:57:52 +0000 (-0500) Subject: selftests: iommu: Use installed kernel headers search path X-Git-Tag: v6.3-rc1~131^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d7a91678aaacf8e2f532c3e04a276af06b42d1c;p=thirdparty%2Flinux.git selftests: iommu: 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 Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/iommu/Makefile b/tools/testing/selftests/iommu/Makefile index 7cb74d26f1417..32c5fdfd0eefc 100644 --- a/tools/testing/selftests/iommu/Makefile +++ b/tools/testing/selftests/iommu/Makefile @@ -1,7 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only CFLAGS += -Wall -O2 -Wno-unused-function -CFLAGS += -I../../../../include/uapi/ -CFLAGS += -I../../../../include/ +CFLAGS += $(KHDR_INCLUDES) CFLAGS += -D_GNU_SOURCE