void-packages/srcpkgs/catatonit/patches/use-environ-instead-of-__environ.patch
2021-08-18 19:49:01 +02:00

30 lines
816 B
Diff

From 75014b1c3099245b7d0f44f24d7f6dc4888a45fd Mon Sep 17 00:00:00 2001
From: Andrey Golovizin <ag@sologoc.com>
Date: Mon, 1 Mar 2021 18:41:42 +0100
Subject: [PATCH] Use environ instead of __environ
The `__environ` variable is internal and undocumented. It also breaks
compilation with musl.
Signed-off-by: Andrey Golovizin <ag@sologoc.com>
---
catatonit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/catatonit.c b/catatonit.c
index a05451e..fd746bb 100644
--- a/catatonit.c
+++ b/catatonit.c
@@ -216,7 +216,7 @@ static int spawn_pid1(char *file, char **argv, sigset_t *sigmask)
if (sigprocmask(SIG_SETMASK, sigmask, NULL) < 0)
bail("failed to reset sigmask: %m");
- execvpe(file, argv, __environ);
+ execvpe(file, argv, environ);
bail("failed to exec pid1: %m");
}
--
2.31.1