8205616: Build fails with system headers after 8204572
Reviewed-by: erikj
Contributed-by: Magnuse Ihse Bursie <magnus.ihse.bursie@oracle.com>, Fridrich Strba <fridrich.strba@suse.com>
--- a/make/common/JdkNativeCompilation.gmk Wed Jun 27 20:19:59 2018 +0100
+++ b/make/common/JdkNativeCompilation.gmk Wed Jun 27 21:56:11 2018 +0200
@@ -119,9 +119,11 @@
endif
ifneq ($$($1_HEADERS_FROM_SRC), false)
- $1_SRC_HEADER_FLAGS := $$(foreach dir, $$(wildcard $$($1_SRC) \
- $$(call GetJavaHeaderDir, $$(MODULE))), -I$$(dir))
+ $1_SRC_HEADER_FLAGS := $$(addprefix -I, $$(wildcard $$($1_SRC)))
endif
+ # Always add the java header dir
+ $1_SRC_HEADER_FLAGS += $$(addprefix -I, $$(call GetJavaHeaderDir, $$(MODULE)))
+
ifneq ($$($1_EXTRA_HEADER_DIRS), )
$1_PROCESSED_EXTRA_HEADER_DIRS := $$(foreach dir, $$($1_EXTRA_HEADER_DIRS), \
$$(call ProcessDir, $$(dir)))