summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arbits/slbt_archive_ctx.c5
-rw-r--r--src/internal/slibtool_ar_impl.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/arbits/slbt_archive_ctx.c b/src/arbits/slbt_archive_ctx.c
index 5754773..575374c 100644
--- a/src/arbits/slbt_archive_ctx.c
+++ b/src/arbits/slbt_archive_ctx.c
@@ -13,6 +13,7 @@
#include <slibtool/slibtool.h>
#include "slibtool_driver_impl.h"
#include "slibtool_errinfo_impl.h"
+#include "slibtool_ar_impl.h"
static int slbt_map_raw_archive(
const struct slbt_driver_ctx * dctx,
@@ -65,6 +66,7 @@ int slbt_ar_get_archive_ctx(
struct slbt_archive_ctx ** pctx)
{
struct slbt_archive_ctx_impl * ctx;
+ struct slbt_archive_meta_impl * mctx;
int prot;
if (!(ctx = calloc(1,sizeof(*ctx))))
@@ -89,11 +91,14 @@ int slbt_ar_get_archive_ctx(
return slbt_ar_free_archive_ctx_impl(ctx,
SLBT_NESTED_ERROR(dctx));
+ mctx = slbt_archive_meta_ictx(ctx->meta);
+
ctx->dctx = dctx;
ctx->path = ctx->pathbuf;
ctx->actx.path = &ctx->path;
ctx->actx.map = &ctx->map;
ctx->actx.meta = ctx->meta;
+ mctx->actx = &ctx->actx;
*pctx = &ctx->actx;
return 0;
diff --git a/src/internal/slibtool_ar_impl.h b/src/internal/slibtool_ar_impl.h
index e02ff88..57ff1cc 100644
--- a/src/internal/slibtool_ar_impl.h
+++ b/src/internal/slibtool_ar_impl.h
@@ -36,6 +36,7 @@ struct ar_armaps_impl {
struct slbt_archive_meta_impl {
const struct slbt_driver_ctx * dctx;
+ struct slbt_archive_ctx * actx;
size_t ofmtattr;
size_t nentries;
void * hdrinfov;