changeset 50847:b970fae53807

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>
author glaubitz
date Wed, 27 Jun 2018 21:56:11 +0200
parents d21a3d3aa4fb
children efaf00d8858a f463a8e2b64e 613aec45dfe2 e17c3bb00215
files make/common/JdkNativeCompilation.gmk
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)))