summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--process.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/process.c b/process.c
index 848d94df2..2c9ef5021 100644
--- a/process.c
+++ b/process.c
@@ -2546,7 +2546,9 @@ rb_pid_t
rb_fork(int *status, int (*chfunc)(void*), void *charg, VALUE fds)
{
if (chfunc) {
- struct chfunc_wrapper_t warg = { chfunc, charg };
+ struct chfunc_wrapper_t warg;
+ warg.chfunc = chfunc;
+ warg.arg = charg;
return rb_fork_err(status, chfunc_wrapper, &warg, fds, NULL, 0);
}
else {