summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-19 06:21:39 +0000
committermidipix <writeonce@midipix.org>2021-04-19 06:21:39 +0000
commit684b80adceb512a511244e5670f8d9dede882a8a (patch)
treec83d717f94d5f1997f670db7b1f059357fdd23bb /src
parent45190f92dcc9fd204ed8266882f233f40f81c4dc (diff)
downloadslibtool-684b80adceb512a511244e5670f8d9dede882a8a.tar.bz2
slibtool-684b80adceb512a511244e5670f8d9dede882a8a.tar.xz
driver: slbt_get_driver_ctx(): properly record the envp parameter.
Diffstat (limited to 'src')
-rw-r--r--src/driver/slbt_driver_ctx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 13efa37..fecf27d 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -220,7 +220,8 @@ static struct slbt_driver_ctx_impl * slbt_driver_ctx_alloc(
struct argv_meta * meta,
const struct slbt_fd_ctx * fdctx,
const struct slbt_common_ctx * cctx,
- struct slbt_split_vector * sargv)
+ struct slbt_split_vector * sargv,
+ char ** envp)
{
struct slbt_driver_ctx_alloc * ictx;
size_t size;
@@ -237,6 +238,7 @@ static struct slbt_driver_ctx_impl * slbt_driver_ctx_alloc(
ictx->ctx.dargv = sargv->dargv;
ictx->ctx.targv = sargv->targv;
ictx->ctx.cargv = sargv->cargv;
+ ictx->ctx.envp = envp;
memcpy(&ictx->ctx.fdctx,fdctx,sizeof(*fdctx));
memcpy(&ictx->ctx.cctx,cctx,sizeof(*cctx));
@@ -1701,7 +1703,7 @@ int slbt_get_driver_ctx(
cctx.tag = SLBT_TAG_CC;
/* driver context */
- if (!(ctx = slbt_driver_ctx_alloc(meta,fdctx,&cctx,&sargv)))
+ if (!(ctx = slbt_driver_ctx_alloc(meta,fdctx,&cctx,&sargv,envp)))
return slbt_get_driver_ctx_fail(0,meta);
/* ctx */