Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 79c65563e..5e1fc8f60 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -21,7 +21,6 @@ details. */
#include <stdlib.h>
#include <unistd.h>
#include <netdb.h>
-#include <fcntl.h>
#define USE_SYS_TYPES_FD_SET
#include <winsock2.h>
#include "cygerrno.h"
@@ -506,7 +505,7 @@ fdsock (int& fd, const char *name, SOCKET soc)
debug_printf ("not setting socket inheritance since winsock2_active %d", winsock2_active);
fhandler_socket *fh = (fhandler_socket *) cygheap->fdtab.build_fhandler (fd, FH_SOCKET, name);
fh->set_io_handle ((HANDLE) soc);
- fh->set_flags (O_RDWR);
+ fh->set_flags (O_RDWR, O_BINARY);
debug_printf ("fd %d, name '%s', soc %p", fd, name, soc);
return fh;
}