Package: openjdk-7-jdk Version: 7~u3-2.1.1~pre1-1 Severity: normal File: /usr/lib/jvm/java-7-openjdk-amd64/include/linux/jni_md.h Tags: patch
jni_md.h has an empty definition of JNIEXPORT macro. jni_md.h line 29:#define JNIEXPORT Since GCC 4, GCC supports symbol visibility. If compiler option -fvisibility=hidden, then all symbols are hidden by default and export symbols should be marked with __attribute__ ((visibility ("default"))). Thus, correct definition for JNIEXPORT would be: #if __GNUC__ >= 4 #define JNIEXPORT __attribute__ ((visibility ("default"))) #else #define JNIEXPORT #endif
diff -u a/jni_md.h b/jni_md.h --- a/jni_md.h 2012-04-30 09:20:27.000000000 +0300 +++ b/jni_md.h 2012-04-30 09:21:24.000000000 +0300 @@ -26,7 +26,11 @@ #ifndef _JAVASOFT_JNI_MD_H_ #define _JAVASOFT_JNI_MD_H_ +#if __GNUC__ >= 4 +#define JNIEXPORT __attribute__ ((visibility ("default"))) +#else #define JNIEXPORT +#endif #define JNIIMPORT #define JNICALL