Blob Blame History Raw
diff -ur dcap-1.9.7.1.orig/src/tunnelManager.c dcap-1.9.7.1/src/tunnelManager.c
--- dcap-1.9.7.1.orig/src/tunnelManager.c	2010-03-09 09:47:40.028551086 +0100
+++ dcap-1.9.7.1/src/tunnelManager.c	2010-03-09 11:32:11.657304932 +0100
@@ -84,6 +84,7 @@
 {
 	void *handle;
 	ioTunnel *tunnel;
+	char *fullpath;
 
 	if(libname == NULL) {
 		dc_debug(DC_ERROR, "Bad tunnel name");
@@ -97,6 +98,14 @@
 
 	handle = dlopen( libname, RTLD_NOW);
 		
+	if(handle == NULL) {
+		fullpath = malloc(strlen("@@LIBDIR@@/dcap/") + strlen(libname) + 1);
+		strcpy(fullpath, "@@LIBDIR@@/dcap/");
+		strcat(fullpath, libname);
+		handle = dlopen(fullpath, RTLD_NOW);
+		free(fullpath);
+	}
+
 	if(handle == NULL) {		
 		goto fail;
 	}