8205616: Build fails with system headers after 8204572
authorglaubitz
Wed, 27 Jun 2018 21:56:11 +0200
changeset 50847 b970fae53807
parent 50846 d21a3d3aa4fb
child 50848 efaf00d8858a
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>
make/common/JdkNativeCompilation.gmk
--- 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)))