From 688ec9217662849ba5f558b8132648e96567c80c Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 15 Apr 2021 07:59:50 +0000 Subject: library: replace all uses of getcwd() with slbt_realpath(). --- src/logic/slbt_exec_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/logic') diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c index 6f73c77..b94ed44 100644 --- a/src/logic/slbt_exec_link.c +++ b/src/logic/slbt_exec_link.c @@ -1549,7 +1549,7 @@ static int slbt_exec_link_create_library( } /* cwd */ - if (!getcwd(cwd,sizeof(cwd))) + if (slbt_realpath(fdcwd,".",O_DIRECTORY,cwd,sizeof(cwd))) return SLBT_SYSTEM_ERROR(dctx,0); /* .libs/libfoo.so --> -L.libs -lfoo */ @@ -1650,7 +1650,7 @@ static int slbt_exec_link_create_executable( verinfo = slbt_source_version(); /* cwd, DL_PATH fixup */ - if (!getcwd(cwd,sizeof(cwd))) { + if (slbt_realpath(fdcwd,".",O_DIRECTORY,cwd,sizeof(cwd))) { return SLBT_SYSTEM_ERROR(dctx,0); } else { slbt_emit_fdwrap_dl_path_fixup( -- cgit v1.2.3