Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 8a053cf12a46e2e7fa78d126c93c2275 > files > 2

ogdi-3.1.2-1mdk.src.rpm

--- ogdi-3.1.1/ogdi/c-api/ecs_dyna.c.orig	Mon Apr  9 17:04:34 2001
+++ ogdi-3.1.1/ogdi/c-api/ecs_dyna.c	Tue Jun 18 21:37:08 2002
@@ -73,9 +73,27 @@
     return (void *) handle;
   }
 #else
+#define MODULES_PATH "/usr/lib/ogdi/"
   void *handle;
 
   handle = dlopen(libname,RTLD_LAZY);
+  if (handle != NULL)
+    return handle;
+
+  if ((temp = (char *) malloc(strlen(MODULES_PATH)+strlen(libname)+1)) == NULL)
+    return NULL;
+  sprintf(temp,MODULES_PATH "%s",libname);
+  handle = dlopen(temp,RTLD_LAZY);
+  free(temp);
+  if (handle != NULL)
+    return handle;
+
+  if ((temp = (char *) malloc(strlen(MODULES_PATH)+strlen(libname)+7)) == NULL)
+    return NULL;
+  sprintf(temp,MODULES_PATH "lib%s.so",libname);
+  handle = dlopen(temp,RTLD_LAZY);
+  free(temp);
+
   if (handle == NULL) {
     /* Try with the .so extension */