summaryrefslogtreecommitdiff
path: root/src/logic/slbt_exec_link.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-13 18:15:38 +0000
committermidipix <writeonce@midipix.org>2021-04-15 08:03:32 +0000
commitc81d169af088b6b90d850d7c0f5c5daae6cfc4ba (patch)
tree4f9a8dbaff4ebae2ec685e8755fb1449644ee744 /src/logic/slbt_exec_link.c
parent7ae5c14d2b4cc2dce023dac9bdf6020962c7bcec (diff)
downloadslibtool-c81d169af088b6b90d850d7c0f5c5daae6cfc4ba.tar.bz2
slibtool-c81d169af088b6b90d850d7c0f5c5daae6cfc4ba.tar.xz
library: replace all uses of [slbt_]readlink() with [slbt_]readlinkat().
Diffstat (limited to 'src/logic/slbt_exec_link.c')
-rw-r--r--src/logic/slbt_exec_link.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index e5376b3..01a46bb 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -304,7 +304,7 @@ static int slbt_adjust_linker_argument(
if (fpic) {
sprintf(dot,"%s",dsosuffix);
- if (slbt_symlink_is_a_placeholder(arg))
+ if (slbt_symlink_is_a_placeholder(fdcwd,arg))
sprintf(dot,"%s",arsuffix);
else if ((fdlib = openat(fdcwd,arg,O_RDONLY)) >= 0)
close(fdlib);
@@ -536,8 +536,9 @@ static int slbt_exec_link_adjust_argument_vector(
sprintf(rpathlnk,"%s.slibtool.rpath",*carg);
if (!fstatat(fdcwd,rpathlnk,&st,AT_SYMLINK_NOFOLLOW)) {
- if (slbt_readlink(
- rpathlnk,\
+ if (slbt_readlinkat(
+ fdcwd,
+ rpathlnk,
rpathdir,
sizeof(rpathdir)))
return slbt_exec_link_exit(