--- a/src/java.desktop/share/native/common/awt/debug/debug_trace.c Fri Mar 22 12:44:47 2019 -0700
+++ b/src/java.desktop/share/native/common/awt/debug/debug_trace.c Tue Mar 26 16:53:01 2019 +0100
@@ -25,7 +25,7 @@
#include "debug_util.h"
-static void DTrace_PrintStdErr(const char *msg);
+static void JNICALL DTrace_PrintStdErr(const char *msg);
#if defined(DEBUG)
enum {
@@ -298,7 +298,7 @@
* Support for Java tracing in release or debug mode builds
*/
-static void DTrace_PrintStdErr(const char *msg) {
+static void JNICALL DTrace_PrintStdErr(const char *msg) {
fprintf(stderr, "%s", msg);
fflush(stderr);
}
--- a/src/java.desktop/share/native/common/awt/debug/debug_trace.h Fri Mar 22 12:44:47 2019 -0700
+++ b/src/java.desktop/share/native/common/awt/debug/debug_trace.h Tue Mar 26 16:53:01 2019 +0100
@@ -45,10 +45,10 @@
};
/* prototype for client provided output callback function */
-typedef void (*DTRACE_OUTPUT_CALLBACK)(const char * msg);
+typedef void (JNICALL *DTRACE_OUTPUT_CALLBACK)(const char * msg);
/* prototype for client provided print callback function */
-typedef void (*DTRACE_PRINT_CALLBACK)(const char * file, int line, int argc, const char * fmt, va_list arglist);
+typedef void (JNICALL *DTRACE_PRINT_CALLBACK)(const char * file, int line, int argc, const char * fmt, va_list arglist);
extern void DTrace_EnableAll(dbool_t enabled);
extern void DTrace_EnableFile(const char * file, dbool_t enabled);