Initial import of ion-devel, version 20031211 into the NetBSD Package
[pkgsrc.git] / wm / ion-devel / patches / patch-ac
1 $NetBSD$
2
3 --- ioncore/readconfig.c.orig   2003-12-06 12:44:30.000000000 +0100
4 +++ ioncore/readconfig.c
5 @@ -87,7 +87,24 @@ bool ioncore_add_scriptdir(const char *d
6  
7  bool ioncore_add_moduledir(const char *dir)
8  {
9 -       return (lt_dlinsertsearchdir(lt_dlgetsearchpath(), dir)==0);
10 +       const char *oldpath;
11 +       char *newpath;
12 +       bool ret;
13 +
14 +       oldpath=lt_dlgetsearchpath();
15 +       if(oldpath==NULL){
16 +               return (lt_dlsetsearchpath(dir)==0);
17 +       }else{
18 +               libtu_asprintf(&newpath, "%s:%s", dir, oldpath);
19 +               if(newpath==NULL){
20 +                       warn_err();
21 +                       return FALSE;
22 +               }else{
23 +                       ret=(lt_dlsetsearchpath(newpath)==0);
24 +                       free(newpath);
25 +                       return ret;
26 +               }
27 +       }
28  }
29  
30