summaryrefslogtreecommitdiffhomepage
path: root/lib/uloop.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-03-15 00:22:48 +0100
committerJo-Philipp Wich <jo@mein.io>2022-03-15 23:15:11 +0100
commit33397a399c608830614d8061fe13db7ebabd0bf7 (patch)
tree39a76a660e3db7fab12598d0f66507841ae02613 /lib/uloop.c
parentbafdc8f59ce010d239d84600418565a8e58cd021 (diff)
uloop: use execvp() on OS X
Since `execvpe()` is a GNU extension, fall back to using `execve()` on OS X. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib/uloop.c')
-rw-r--r--lib/uloop.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/uloop.c b/lib/uloop.c
index bc57336..b74633d 100644
--- a/lib/uloop.c
+++ b/lib/uloop.c
@@ -534,8 +534,13 @@ uc_uloop_process(uc_vm_t *vm, size_t nargs)
free(buf);
}
+#ifdef __APPLE__
+ execve((const char *)ucv_string_get(executable),
+ (char * const *)argp, (char * const *)envp);
+#else
execvpe((const char *)ucv_string_get(executable),
(char * const *)argp, (char * const *)envp);
+#endif
_exit(-1);
}