summaryrefslogtreecommitdiffhomepage
path: root/src/logic/slbt_exec_install.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-07-06 08:21:02 -0400
committermidipix <writeonce@midipix.org>2018-07-06 08:21:02 -0400
commit5fac6c64cec889bc3587eee2e1b3cfabbe512967 (patch)
tree0de15f404481caa7cc3103a3fda0c3d7812ede51 /src/logic/slbt_exec_install.c
parentca72f5d6c0d515036748cef287cc0d3a277536ea (diff)
downloadslibtool-5fac6c64cec889bc3587eee2e1b3cfabbe512967.tar.bz2
slibtool-5fac6c64cec889bc3587eee2e1b3cfabbe512967.tar.xz
library interfaces: invocations of openat() now use the context's fdcwd.
Diffstat (limited to 'src/logic/slbt_exec_install.c')
-rw-r--r--src/logic/slbt_exec_install.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c
index 9380e8a..32c1ac6 100644
--- a/src/logic/slbt_exec_install.c
+++ b/src/logic/slbt_exec_install.c
@@ -226,6 +226,7 @@ static int slbt_exec_install_library_wrapper(
struct argv_entry * entry,
char * dstdir)
{
+ int fdcwd;
int fddst;
size_t buflen;
const char * base;
@@ -252,12 +253,15 @@ static int slbt_exec_install_library_wrapper(
entry->arg) >= sizeof(clainame))
return SLBT_BUFFER_ERROR(dctx);
+ /* fdcwd */
+ fdcwd = slbt_driver_fdcwd(dctx);
+
/* fddst (libfoo.la.slibtool.install, build directory) */
- if ((fddst = openat(AT_FDCWD,clainame,O_RDWR|O_CREAT|O_TRUNC,0644)) < 0)
+ if ((fddst = openat(fdcwd,clainame,O_RDWR|O_CREAT|O_TRUNC,0644)) < 0)
return SLBT_SYSTEM_ERROR(dctx);
/* mapinfo (libfoo.la, build directory) */
- if (!(mapinfo = slbt_map_file(AT_FDCWD,entry->arg,SLBT_MAP_INPUT))) {
+ if (!(mapinfo = slbt_map_file(fdcwd,entry->arg,SLBT_MAP_INPUT))) {
close(fddst);
return SLBT_SYSTEM_ERROR(dctx);
}