summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/slibtool/slibtool.h2
-rw-r--r--src/logic/linkcmd/slbt_linkcmd_archive.c2
-rw-r--r--src/util/slbt_archive_import.c14
3 files changed, 10 insertions, 8 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h
index f8e96fa..e3277cc 100644
--- a/include/slibtool/slibtool.h
+++ b/include/slibtool/slibtool.h
@@ -414,7 +414,7 @@ slbt_api int slbt_host_group_is_darwin (const struct slbt_driver_ctx *);
slbt_api int slbt_host_flavor_settings (const char *, const struct slbt_flavor_settings **);
/* utility helper interfaces */
-slbt_api int slbt_util_import_archive (const struct slbt_driver_ctx *, struct slbt_exec_ctx *,
+slbt_api int slbt_util_import_archive (const struct slbt_exec_ctx *,
char * dstarchive, char * srcarchive);
slbt_api int slbt_util_create_mapfile (const struct slbt_symlist_ctx *, const char *, mode_t);
diff --git a/src/logic/linkcmd/slbt_linkcmd_archive.c b/src/logic/linkcmd/slbt_linkcmd_archive.c
index f7ddc5c..051a563 100644
--- a/src/logic/linkcmd/slbt_linkcmd_archive.c
+++ b/src/logic/linkcmd/slbt_linkcmd_archive.c
@@ -165,7 +165,7 @@ slbt_hidden int slbt_exec_link_create_archive(
/* input objects associated with .la archives */
for (parg=ectx->cargv; *parg; parg++)
if (slbt_adjust_wrapper_argument(*parg,true))
- if (slbt_util_import_archive(dctx,ectx,output,*parg))
+ if (slbt_util_import_archive(ectx,output,*parg))
return SLBT_NESTED_ERROR(dctx);
return 0;
diff --git a/src/util/slbt_archive_import.c b/src/util/slbt_archive_import.c
index 5657fcc..d2d72c5 100644
--- a/src/util/slbt_archive_import.c
+++ b/src/util/slbt_archive_import.c
@@ -11,15 +11,14 @@
/* legacy fallback, no longer in use */
extern int slbt_util_import_archive_mri(
- const struct slbt_driver_ctx * dctx,
- struct slbt_exec_ctx * ectx,
+ const struct slbt_exec_ctx * ectx,
char * dstarchive,
char * srcarchive);
/* use slibtool's in-memory archive merging facility */
static int slbt_util_import_archive_impl(
- const struct slbt_driver_ctx * dctx,
- struct slbt_exec_ctx * ectx,
+ const struct slbt_driver_ctx * dctx,
+ const struct slbt_exec_ctx * ectx,
char * dstarchive,
char * srcarchive)
{
@@ -52,11 +51,14 @@ static int slbt_util_import_archive_impl(
int slbt_util_import_archive(
- const struct slbt_driver_ctx * dctx,
- struct slbt_exec_ctx * ectx,
+ const struct slbt_exec_ctx * ectx,
char * dstarchive,
char * srcarchive)
{
+ const struct slbt_driver_ctx * dctx;
+
+ dctx = (slbt_get_exec_ictx(ectx))->dctx;
+
if (slbt_symlink_is_a_placeholder(
slbt_driver_fdcwd(dctx),
srcarchive))