blob: 3c2c134ec6436c0483e498c0bf95c22fdbe00df8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
$NetBSD: patch-ac,v 1.1.1.1 2004/01/09 23:03:20 cube Exp $
--- ioncore/readconfig.c.orig 2003-12-06 12:44:30.000000000 +0100
+++ ioncore/readconfig.c
@@ -87,7 +87,24 @@ bool ioncore_add_scriptdir(const char *d
bool ioncore_add_moduledir(const char *dir)
{
- return (lt_dlinsertsearchdir(lt_dlgetsearchpath(), dir)==0);
+ const char *oldpath;
+ char *newpath;
+ bool ret;
+
+ oldpath=lt_dlgetsearchpath();
+ if(oldpath==NULL){
+ return (lt_dlsetsearchpath(dir)==0);
+ }else{
+ libtu_asprintf(&newpath, "%s:%s", dir, oldpath);
+ if(newpath==NULL){
+ warn_err();
+ return FALSE;
+ }else{
+ ret=(lt_dlsetsearchpath(newpath)==0);
+ free(newpath);
+ return ret;
+ }
+ }
}
|