diff options
author | midipix <writeonce@midipix.org> | 2016-03-20 11:44:43 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-03-20 13:01:27 -0400 |
commit | 6d0e8adf800c3f3bd5767ebb0cd6d2842d56a337 (patch) | |
tree | 4f51ca7c0ac4932e8f4127ed8433c2856ce75c51 /src | |
parent | 583c0a2be1ec2dea2e3362bbc09b42eeb2817d6e (diff) | |
download | slibtool-6d0e8adf800c3f3bd5767ebb0cd6d2842d56a337.tar.bz2 slibtool-6d0e8adf800c3f3bd5767ebb0cd6d2842d56a337.tar.xz |
struct slbt_exec_ctx: added alternate argument vector for ar invocation.
Diffstat (limited to 'src')
-rw-r--r-- | src/logic/slbt_exec_ctx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c index 5dd9d70..0af29ca 100644 --- a/src/logic/slbt_exec_ctx.c +++ b/src/logic/slbt_exec_ctx.c @@ -102,7 +102,7 @@ static struct slbt_exec_ctx_impl * slbt_exec_ctx_alloc( if (!(args = malloc(size))) return 0; - size = sizeof(*ictx) + (argc+SLBT_ARGV_SPARE_PTRS)*sizeof(char *); + size = sizeof(*ictx) + (2*(argc+1)+SLBT_ARGV_SPARE_PTRS)*sizeof(char *); if (!(ictx = calloc(1,size))) { free(args); @@ -136,6 +136,7 @@ int slbt_get_exec_ctx( /* init with guard for later .lo check */ ch = ictx->args + strlen(".lo"); ictx->ctx.argv = ictx->buffer; + ictx->ctx.altv = &ictx->buffer[ictx->argc + 1]; /* <compiler> */ ictx->ctx.program = dctx->cctx->cargv[0]; |