summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>2021-06-21 14:41:25 +0200
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-20 00:15:30 +0900
commit4705ebd907343cf635cbd9288503653fccf61f0f (patch)
treefe7b8ed2193a94e956916a10e3d66ead26edaee5
parentc0a892a7f04689ea360784ead526b8d9c02809d2 (diff)
MINGW: Fix build error on Windows UCRT
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4599
-rw-r--r--win32/win32.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 5640316b0f..b0e43ed45f 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -887,6 +887,13 @@ socklist_delete(SOCKET *sockp, int *flagp)
return ret;
}
+#if RUBY_MSVCRT_VERSION >= 80
+# ifdef __MINGW32__
+# define _CrtSetReportMode(type,mode) ((void)0)
+# define _RTC_SetErrorFunc(func) ((void)0)
+# endif
+static void set_pioinfo_extra(void);
+#endif
static int w32_cmdvector(const WCHAR *, char ***, UINT, rb_encoding *);
//
// Initialization stuff
@@ -896,7 +903,6 @@ void
rb_w32_sysinit(int *argc, char ***argv)
{
#if RUBY_MSVCRT_VERSION >= 80
- static void set_pioinfo_extra(void);
_CrtSetReportMode(_CRT_ASSERT, 0);
_set_invalid_parameter_handler(invalid_parameter);