diff options
author | midipix <writeonce@midipix.org> | 2020-09-14 09:47:18 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2020-09-15 02:46:19 +0000 |
commit | d70e3766bc3c84b11a1d574cf12826d0df62e889 (patch) | |
tree | e70280ba8afa5376588654d889eaf7fc85380e54 /src | |
parent | 2c4e5f97a9937016257e70e4841404ca376e808f (diff) | |
download | slibtool-d70e3766bc3c84b11a1d574cf12826d0df62e889.tar.bz2 slibtool-d70e3766bc3c84b11a1d574cf12826d0df62e889.tar.xz |
heuristics: support finding arbitrarily named scripts up the build tree.
Diffstat (limited to 'src')
-rw-r--r-- | src/internal/slibtool_lconf_impl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/internal/slibtool_lconf_impl.c b/src/internal/slibtool_lconf_impl.c index 92aaa20..6b55c9f 100644 --- a/src/internal/slibtool_lconf_impl.c +++ b/src/internal/slibtool_lconf_impl.c @@ -45,7 +45,7 @@ static int slbt_lconf_open( fdcwd = slbt_driver_fdcwd(dctx); fdlconfdir = fdcwd; - if (lconf) + if (lconf && strchr(lconf,'/')) return ((fdlconf = openat(fdcwd,lconf,O_RDONLY,0)) < 0) ? SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_LCONF_OPEN) : fdlconf; @@ -53,7 +53,8 @@ static int slbt_lconf_open( if (fstatat(fdlconfdir,".",&stcwd,0) < 0) return SLBT_SYSTEM_ERROR(dctx); - fdlconf = openat(fdlconfdir,"libtool",O_RDONLY,0); + lconf = lconf ? lconf : "libtool"; + fdlconf = openat(fdlconfdir,lconf,O_RDONLY,0); stinode = stcwd.st_ino; while (fdlconf < 0) { @@ -81,7 +82,7 @@ static int slbt_lconf_open( } fdlconfdir = fdparent; - fdlconf = openat(fdlconfdir,"libtool",O_RDONLY,0); + fdlconf = openat(fdlconfdir,lconf,O_RDONLY,0); stinode = stparent.st_ino; } |