summaryrefslogtreecommitdiffhomepage
path: root/src/internal/slibtool_symlink_impl.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/internal/slibtool_symlink_impl.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/internal/slibtool_symlink_impl.c')
-rw-r--r--src/internal/slibtool_symlink_impl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/internal/slibtool_symlink_impl.c b/src/internal/slibtool_symlink_impl.c
index dd91d5e..cc09a32 100644
--- a/src/internal/slibtool_symlink_impl.c
+++ b/src/internal/slibtool_symlink_impl.c
@@ -108,7 +108,7 @@ int slbt_create_symlink(
: 0;
}
-int slbt_symlink_is_a_placeholder(char * lnkpath)
+int slbt_symlink_is_a_placeholder(int fdcwd, char * lnkpath)
{
size_t len;
char slink [PATH_MAX];
@@ -121,6 +121,6 @@ int slbt_symlink_is_a_placeholder(char * lnkpath)
memcpy(slink,lnkpath,len);
memcpy(&slink[len],suffix,sizeof(suffix));
- return (!slbt_readlink(slink,target,sizeof(target)))
+ return (!slbt_readlinkat(fdcwd,slink,target,sizeof(target)))
&& (!strcmp(target,"/dev/null"));
}