--- old/src/solaris/native/common/jni_util_md.c 2013-03-06 22:19:44.332317470 -0500 +++ new/src/solaris/native/common/jni_util_md.c 2013-03-06 22:19:43.248256605 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -25,6 +25,7 @@ #include "jni.h" #include "jni_util.h" +#include "dlfcn.h" jstring nativeNewStringPlatform(JNIEnv *env, const char *str) { return NULL; @@ -33,3 +34,22 @@ char* nativeGetStringPlatformChars(JNIEnv *env, jstring jstr, jboolean *isCopy) { return NULL; } + +void* getProcessHandle() { + static void *procHandle = NULL; + if (procHandle != NULL) { + return procHandle; + } + procHandle = (void*)dlopen(NULL, RTLD_LAZY); + return procHandle; +} + +void buildJniFunctionName(const char *sym, const char *cname, + char *jniEntryName) { + strcpy(jniEntryName, sym); + if (cname != NULL) { + strcat(jniEntryName, "_"); + strcat(jniEntryName, cname); + } +} +