Changes to cross-compile with DJGPP

This commit is contained in:
Ray Chason
2023-06-17 17:20:33 -04:00
parent 853b25972e
commit 23e9befbc0
4 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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
+2
View File
@@ -38,7 +38,9 @@
#define GETCWD getcwd
#define CHMOD(a, b) chmod(a,b)
#include <sys/file.h>
#ifndef __DJGPP__
#include <libgen.h>
#endif
#include <sys/param.h>
#include <pwd.h>
#endif
+2
View File
@@ -20,7 +20,9 @@
#include <sys/file.h>
#include <sys/param.h>
#include <sys/wait.h>
#ifndef __DJGPP__
#include <libgen.h>
#endif
#include <pwd.h>
#include <unistd.h>
#endif
+4
View File
@@ -46,7 +46,11 @@
#include <unistd.h>
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