-
-
Save FROGGS/601af1d005a0c1b13df5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/6model/reprs/MVMOSHandle.c b/src/6model/reprs/MVMOSHandle.c | |
index 75d0858..61a0de8 100644 | |
--- a/src/6model/reprs/MVMOSHandle.c | |
+++ b/src/6model/reprs/MVMOSHandle.c | |
@@ -1,5 +1,9 @@ | |
#include "moar.h" | |
+#ifndef _WIN32 | |
+#include <sys/wait.h> | |
+#endif | |
+ | |
/* This representation's function pointer table. */ | |
static const MVMREPROps this_repr; | |
@@ -62,7 +66,7 @@ static void gc_free(MVMThreadContext *tc, MVMObject *obj) { | |
#ifdef _WIN32 | |
uv_process_close(tc->loop, handle->body.u.process); | |
#else | |
- waitpid(handle->body.u.process->pid); | |
+ waitpid(handle->body.u.process->pid, NULL, 0); | |
#endif | |
uv_unref((uv_handle_t *)handle->body.u.process); | |
uv_run(tc->loop, UV_RUN_DEFAULT); | |
diff --git a/src/io/fileops.c b/src/io/fileops.c | |
index 84f09a9..391d911 100644 | |
--- a/src/io/fileops.c | |
+++ b/src/io/fileops.c | |
@@ -2,6 +2,7 @@ | |
#include "platform/io.h" | |
#ifndef _WIN32 | |
+#include <sys/wait.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#define DEFAULT_MODE 0x0FFF | |
@@ -294,7 +295,7 @@ void MVM_file_close_fh(MVMThreadContext *tc, MVMObject *oshandle) { | |
#ifdef _WIN32 | |
uv_process_close(tc->loop, handle->body.u.process); | |
#else | |
- waitpid(handle->body.u.process->pid); | |
+ waitpid(handle->body.u.process->pid, NULL, 0); | |
#endif | |
uv_unref((uv_handle_t *)handle->body.u.process); | |
uv_run(tc->loop, UV_RUN_DEFAULT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment