diff options
| author | dearblue <[email protected]> | 2020-02-01 15:58:32 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2020-02-01 15:58:32 +0900 |
| commit | 8020374d6b8b5d2d31acc0dfec8c2273b6d22e76 (patch) | |
| tree | dc387cc8c7aba2ca3ec9463de9b66df51bbc8a35 /mrbgems | |
| parent | db64bd42d358425250d05b02a0880702da2cea87 (diff) | |
| download | mruby-8020374d6b8b5d2d31acc0dfec8c2273b6d22e76.tar.gz mruby-8020374d6b8b5d2d31acc0dfec8c2273b6d22e76.zip | |
Fix builds for old mingw in mruby-socket; ref #4914
Diffstat (limited to 'mrbgems')
| -rw-r--r-- | mrbgems/mruby-io/test/mruby_io_test.c | 7 | ||||
| -rw-r--r-- | mrbgems/mruby-socket/test/sockettest.c | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/mrbgems/mruby-io/test/mruby_io_test.c b/mrbgems/mruby-io/test/mruby_io_test.c index 3cf1c6111..7e272d45a 100644 --- a/mrbgems/mruby-io/test/mruby_io_test.c +++ b/mrbgems/mruby-io/test/mruby_io_test.c @@ -1,3 +1,4 @@ +#include <mruby/common.h> #include <sys/types.h> #include <errno.h> @@ -18,12 +19,6 @@ typedef int mode_t; #define open _open #define close _close -#if defined(__MINGW64_VERSION_MAJOR) -# define MRB_MINGW64_VERSION (__MINGW64_VERSION_MAJOR * 1000 + __MINGW64_VERSION_MINOR) -#elif defined(__MINGW32_MAJOR_VERSION) -# define MRB_MINGW32_VERSION (__MINGW32_MAJOR_VERSION * 1000 + __MINGW32_MINOR_VERSION) -#endif - #if defined(_MSC_VER) || \ (defined(MRB_MINGW32_VERSION) && MRB_MINGW32_VERSION < 3021) || \ (defined(MRB_MINGW64_VERSION) && MRB_MINGW64_VERSION < 4000) diff --git a/mrbgems/mruby-socket/test/sockettest.c b/mrbgems/mruby-socket/test/sockettest.c index 3017c7cc1..e9247d030 100644 --- a/mrbgems/mruby-socket/test/sockettest.c +++ b/mrbgems/mruby-socket/test/sockettest.c @@ -8,7 +8,9 @@ #include <io.h> -#ifdef _MSC_VER +#if defined(_MSC_VER) || \ + (defined(MRB_MINGW32_VERSION) && MRB_MINGW32_VERSION < 3021) || \ + (defined(MRB_MINGW64_VERSION) && MRB_MINGW64_VERSION < 4000) #include <fcntl.h> #include <sys/stat.h> |
