summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/internal/slibtool_symlink_impl.c2
-rw-r--r--src/logic/slbt_exec_link.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/internal/slibtool_symlink_impl.c b/src/internal/slibtool_symlink_impl.c
index 8f1244d..ca7f6cd 100644
--- a/src/internal/slibtool_symlink_impl.c
+++ b/src/internal/slibtool_symlink_impl.c
@@ -108,7 +108,7 @@ int slbt_create_symlink(
if (symlinkat(atarget,fdcwd,tmplnk))
return SLBT_SYSTEM_ERROR(dctx,tmplnk);
- return rename(tmplnk,lnkname)
+ return renameat(fdcwd,tmplnk,fdcwd,lnkname)
? SLBT_SYSTEM_ERROR(dctx,lnkname)
: 0;
}
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 94f1f19..d83935c 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -1766,7 +1766,7 @@ static int slbt_exec_link_create_executable(
&depsmeta,
SLBT_SYSTEM_ERROR(dctx,wrapper));
- if (rename(wrapper,dctx->cctx->output))
+ if (renameat(fdcwd,wrapper,fdcwd,dctx->cctx->output))
return slbt_exec_link_exit(
&depsmeta,
SLBT_SYSTEM_ERROR(dctx,dctx->cctx->output));