summaryrefslogtreecommitdiffhomepage
path: root/lib/uloop.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2023-09-29 09:29:52 +0200
committerFelix Fietkau <nbd@nbd.name>2023-10-09 15:56:32 +0200
commit8b2388482ec8a67e2ecf5032d81d889b187a32cd (patch)
treec393b6da18f2c119d719e0766c4e16889ff1a018 /lib/uloop.c
parent7c209d736907e18ec8d79a57328c1e3bad7b2786 (diff)
uloop: rename environ variable to avoid clashing with system macro on macOS
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'lib/uloop.c')
-rw-r--r--lib/uloop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/uloop.c b/lib/uloop.c
index d8d702f..c4b1105 100644
--- a/lib/uloop.c
+++ b/lib/uloop.c
@@ -490,7 +490,7 @@ uc_uloop_process(uc_vm_t *vm, size_t nargs)
{
uc_value_t *executable = uc_fn_arg(0);
uc_value_t *arguments = uc_fn_arg(1);
- uc_value_t *environ = uc_fn_arg(2);
+ uc_value_t *env_arg = uc_fn_arg(2);
uc_value_t *callback = uc_fn_arg(3);
uc_uloop_process_t *process;
uc_stringbuf_t *buf;
@@ -501,7 +501,7 @@ uc_uloop_process(uc_vm_t *vm, size_t nargs)
if (ucv_type(executable) != UC_STRING ||
(arguments && ucv_type(arguments) != UC_ARRAY) ||
- (environ && ucv_type(environ) != UC_OBJECT) ||
+ (env_arg && ucv_type(env_arg) != UC_OBJECT) ||
!ucv_is_callable(callback)) {
err_return(EINVAL);
}
@@ -513,7 +513,7 @@ uc_uloop_process(uc_vm_t *vm, size_t nargs)
if (pid == 0) {
argp = calloc(ucv_array_length(arguments) + 2, sizeof(char *));
- envp = calloc(ucv_object_length(environ) + 1, sizeof(char *));
+ envp = calloc(ucv_object_length(env_arg) + 1, sizeof(char *));
if (!argp || !envp)
_exit(-1);
@@ -525,7 +525,7 @@ uc_uloop_process(uc_vm_t *vm, size_t nargs)
i = 0;
- ucv_object_foreach(environ, envk, envv) {
+ ucv_object_foreach(env_arg, envk, envv) {
buf = xprintbuf_new();
ucv_stringbuf_printf(buf, "%s=", envk);