6571600: JNI use results in UnsatisfiedLinkError looking for libmawt.so
authordbuck
Mon, 23 Dec 2013 11:57:03 -0800
changeset 23252 4c62cbe8fddf
parent 23251 62a87a76d5d9
child 23253 55425a62017f
6571600: JNI use results in UnsatisfiedLinkError looking for libmawt.so Summary: Fix is to call dladdr with name less likely to cause name conflict. Reviewed-by: serb, anthony
jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c
--- a/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c	Mon Dec 23 19:03:37 2013 +0400
+++ b/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c	Mon Dec 23 11:57:03 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -109,7 +109,7 @@
     jvm = vm;
 
     /* Get address of this library and the directory containing it. */
-    dladdr((void *)JNI_OnLoad, &dlinfo);
+    dladdr((void *)AWT_OnLoad, &dlinfo);
     realpath((char *)dlinfo.dli_fname, buf);
     len = strlen(buf);
     p = strrchr(buf, '/');