summaryrefslogtreecommitdiffhomepage
path: root/src/logic
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-15 06:22:36 +0000
committermidipix <writeonce@midipix.org>2021-04-15 08:03:32 +0000
commitb8d3bb8ec89cc703b939bd7097f931ce4ddc2200 (patch)
tree9e47196099e98780f3eccf1462536b3c2fab5f2e /src/logic
parentc81d169af088b6b90d850d7c0f5c5daae6cfc4ba (diff)
downloadslibtool-b8d3bb8ec89cc703b939bd7097f931ce4ddc2200.tar.bz2
slibtool-b8d3bb8ec89cc703b939bd7097f931ce4ddc2200.tar.xz
library: replace all uses of symlink() with symlinkat().
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_link.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 01a46bb..94f1f19 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -1357,8 +1357,8 @@ static int slbt_exec_link_create_archive(
if (slbt_exec_link_remove_file(dctx,ectx,arlink))
return SLBT_NESTED_ERROR(dctx);
- if (symlink(arfile,arlink))
- return SLBT_SYSTEM_ERROR(dctx,arlink);
+ if (slbt_create_symlink(dctx,ectx,arfile,arlink,0))
+ return SLBT_NESTED_ERROR(dctx);
}
return 0;
@@ -1535,8 +1535,12 @@ static int slbt_exec_link_create_library(
if (slbt_exec_link_remove_file(dctx,ectx,ectx->rpathfilename))
return SLBT_NESTED_ERROR(dctx);
- if (symlink(dctx->cctx->host.ldrpath,ectx->rpathfilename))
- return SLBT_SYSTEM_ERROR(dctx,ectx->rpathfilename);
+ if (slbt_create_symlink(
+ dctx,ectx,
+ dctx->cctx->host.ldrpath,
+ ectx->rpathfilename,
+ 0))
+ return SLBT_NESTED_ERROR(dctx);
}
/* cwd */