diff --git a/mrbgems/mruby-dir/src/dir.c b/mrbgems/mruby-dir/src/dir.c index d7d00436a..80f70df19 100644 --- a/mrbgems/mruby-dir/src/dir.c +++ b/mrbgems/mruby-dir/src/dir.c @@ -166,7 +166,7 @@ mrb_dir_chdir(mrb_state *mrb, mrb_value klass) static mrb_value mrb_dir_chroot(mrb_state *mrb, mrb_value self) { -#if defined(_WIN32) || defined(_WIN64) || defined(__ANDROID__) +#if defined(_WIN32) || defined(_WIN64) || defined(__ANDROID__) || defined(__MSDOS__) mrb_raise(mrb, E_NOTIMP_ERROR, "chroot() unreliable on your system"); return mrb_fixnum_value(0); #else diff --git a/mrbgems/mruby-io/src/file.c b/mrbgems/mruby-io/src/file.c index 44aefdf45..2bfef3030 100644 --- a/mrbgems/mruby-io/src/file.c +++ b/mrbgems/mruby-io/src/file.c @@ -38,7 +38,9 @@ #define GETCWD getcwd #define CHMOD(a, b) chmod(a,b) #include +#ifndef __DJGPP__ #include +#endif #include #include #endif diff --git a/mrbgems/mruby-io/src/file_test.c b/mrbgems/mruby-io/src/file_test.c index e7d23406f..1d7aa564e 100644 --- a/mrbgems/mruby-io/src/file_test.c +++ b/mrbgems/mruby-io/src/file_test.c @@ -20,7 +20,9 @@ #include #include #include +#ifndef __DJGPP__ #include +#endif #include #include #endif diff --git a/mrbgems/mruby-io/src/io.c b/mrbgems/mruby-io/src/io.c index 5dd89ce68..560acde62 100644 --- a/mrbgems/mruby-io/src/io.c +++ b/mrbgems/mruby-io/src/io.c @@ -46,7 +46,11 @@ #include typedef size_t fsize_t; typedef time_t ftime_t; +#ifdef __DJGPP__ + typedef long fsuseconds_t; +#else typedef suseconds_t fsuseconds_t; +#endif typedef mode_t fmode_t; typedef ssize_t fssize_t; #endif