$OpenBSD: patch-jdk_src_solaris_native_sun_awt_CUPSfuncs_c,v 1.1 2009/05/23 03:03:25 kurt Exp $
--- jdk/src/solaris/native/sun/awt/CUPSfuncs.c.orig	Mon May 18 19:49:50 2009
+++ jdk/src/solaris/native/sun/awt/CUPSfuncs.c	Mon May 18 19:49:58 2009
@@ -25,6 +25,7 @@
 
 #include <jni.h>
 #include <jni_util.h>
+#include <jvm_md.h>
 #include <dlfcn.h>
 #include <cups/cups.h>
 #include <cups/ppd.h>
@@ -65,10 +66,11 @@ fn_ppdPageSize j2d_ppdPageSize;
 JNIEXPORT jboolean JNICALL
 Java_sun_print_CUPSPrinter_initIDs(JNIEnv *env,
                                          jobject printObj) {
-  void *handle = dlopen("libcups.so.2", RTLD_LAZY | RTLD_GLOBAL);
+  void *handle = dlopen(VERSIONED_JNI_LIB_NAME("cups", "2"),
+                        RTLD_LAZY | RTLD_GLOBAL);
 
   if (handle == NULL) {
-    handle = dlopen("libcups.so", RTLD_LAZY | RTLD_GLOBAL);
+    handle = dlopen(JNI_LIB_NAME("cups"), RTLD_LAZY | RTLD_GLOBAL);
     if (handle == NULL) {
       return JNI_FALSE;
     }
