$OpenBSD: patch-jdk_src_solaris_native_sun_java2d_x11_X11SurfaceData_c,v 1.1 2009/05/23 03:03:25 kurt Exp $
--- jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c.orig	Mon May 18 20:24:57 2009
+++ jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Mon May 18 20:25:10 2009
@@ -32,6 +32,7 @@
 #include "gdefs.h"
 
 #include "jni_util.h"
+#include "jvm_md.h"
 #include "awt_Component.h"
 #include "awt_GraphicsEnv.h"
 
@@ -128,7 +129,7 @@ Java_sun_java2d_x11_X11SurfaceData_initIDs(JNIEnv *env
 
     if (tryDGA && (getenv("NO_J2D_DGA") == NULL)) {
     /* we use RTLD_NOW because of bug 4032715 */
-        lib = dlopen("libsunwjdga.so", RTLD_NOW);
+        lib = dlopen(JNI_LIB_NAME("sunwjdga"), RTLD_NOW);
     }
     dgaAvailable = JNI_FALSE;
     if (lib != NULL) {
