MINGW: Fix build error on Windows UCRT

This commit is contained in:
xtkoba (Tee KOBAYASHI) 2021-06-21 14:41:25 +02:00 committed by Nobuyoshi Nakada
parent c0a892a7f0
commit 4705ebd907
Notes: git 2021-09-20 00:16:03 +09:00

View File

@ -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);