Fix build with Clang.

This commit is contained in:
Jung-uk Kim 2020-03-19 08:02:33 +00:00
parent 309826e36b
commit 8f134093ae
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=528701

View File

@ -0,0 +1,14 @@
--- hotspot/src/cpu/x86/vm/jni_x86.h.orig 2020-03-01 18:10:20 UTC
+++ hotspot/src/cpu/x86/vm/jni_x86.h
@@ -28,7 +28,10 @@
#if defined(SOLARIS) || defined(LINUX) || defined(_ALLBSD_SOURCE)
-#if defined(__GNUC__) && (__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2)
+#ifndef __has_attribute
+ #define __has_attribute(x) 0
+#endif
+#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT __attribute__((visibility("default")))
#else