--- old/src/cpu/x86/vm/jni_x86.h 2013-05-01 16:28:18.937535142 -0400 +++ new/src/cpu/x86/vm/jni_x86.h 2013-05-01 16:28:18.762533504 -0400 @@ -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