Skip to content
Browse files

fix build on linux.

  • Loading branch information...
1 parent 2ed0194 commit e84d66ad5175ac0bc5ce1e98c62975f605251ea1 @mattn mattn committed Dec 28, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/mrb_uv.c
View
5 src/mrb_uv.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
#include <errno.h>
#include <memory.h>
#include <mruby.h>
@@ -11,6 +12,8 @@
#include <uv.h>
#include <stdio.h>
#include <fcntl.h>
+#include <limits.h>
+#include <unistd.h>
#if 1
#define ARENA_SAVE \
@@ -2925,7 +2928,7 @@ mrb_uv_process_spawn(mrb_state *mrb, mrb_value self)
}
mrb_iv_set(mrb, self, mrb_intern(mrb, "exit_cb"), b);
- char cwd[MAX_PATH] = {0};
+ char cwd[PATH_MAX] = {0};
uv_cwd(cwd, sizeof(cwd));
char** args = malloc(sizeof(char*) * (RARRAY_LEN(arg_args)+2));
int i;

0 comments on commit e84d66a

Please sign in to comment.
Something went wrong with that request. Please try again.