diff options
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r-- | ext/socket/socket.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 7fe4e3defa..b4b6412f3a 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -240,6 +240,9 @@ init_sock(VALUE sock, int fd) MakeOpenFile(sock, fp); fp->fd = fd; fp->mode = FMODE_READWRITE|FMODE_DUPLEX; +#if defined(_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__EMX__) + fp->mode |= FMODE_BINMODE; +#endif if (do_not_reverse_lookup) { fp->mode |= FMODE_NOREVLOOKUP; } |