src/solaris/native/common/jni_util_md.c

Print this page

        

@@ -23,10 +23,25 @@
  * questions.
  */
 
 #include "jni.h"
 #include "jni_util.h"
+#include "dlfcn.h"
+
+void* getProcessHandle() {
+  static procHandle = NULL;
+  if (procHandle != NULL) {
+    return procHandle;
+  }
+  // char * err1 = (char *)dlerror();
+  procHandle = (void*)dlopen(NULL, RTLD_LAZY);
+  //  if (procHandle == NULL) {
+  //    char * err = (char *)dlerror();
+  //    fprintf(stderr, "dlopen: %s\n", err);
+  //  }
+  return procHandle;
+}
 
 jstring nativeNewStringPlatform(JNIEnv *env, const char *str) {
     return NULL;
 }