Skip to content

Commit 528344b

Browse files
include/ruby/win32.h: explicitly define HAVE_SHUTDOWN
Configuration for mingw32 can't detect 'shutdown' due to wrong -l option even though it's available (this has been going on for a while, and it needs to be fixed). In this situation, include/ruby/missing.h declares a stub shutdown function since 7ee7863, and another shutdown decl is came from system header. They are incompatible at stdcall attribute, so it causes compilation failure. This change defines a HAVE_SHUTDOWN to guard a newly introduced stub decl in include/ruby/missing.h
1 parent 0dd8c61 commit 528344b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

include/ruby/win32.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,8 @@ extern char *rb_w32_strerror(int);
653653
#undef setsockopt
654654
#define setsockopt(s, v, n, o, l) rb_w32_setsockopt(s, v, n, o, l)
655655

656+
#undef HAVE_SHUTDOWN
657+
#define HAVE_SHUTDOWN 1
656658
#undef shutdown
657659
#define shutdown(s, h) rb_w32_shutdown(s, h)
658660

0 commit comments

Comments
 (0)