This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH setup 3/3] Use Winsock 2 throughout
- From: Yaakov Selkowitz <yselkowi at redhat dot com>
- To: cygwin-apps at cygwin dot com
- Date: Fri, 8 Jan 2016 14:32:37 -0600
- Subject: [PATCH setup 3/3] Use Winsock 2 throughout
- Authentication-results: sourceware.org; auth=none
- References: <1452285157-12712-1-git-send-email-yselkowi at redhat dot com>
Winsock 2 was shipped with Windows 98.
* Makefile.am (@SETUP@_LDADD): Link with ws2_32 instead of wsock32.
* nio-ftp.cc: Include winsock2.h instead of winsock.h.
* nio-http.cc: Ditto.
* simpsock.cc: Ditto.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
---
Makefile.am | 2 +-
nio-ftp.cc | 2 +-
nio-http.cc | 2 +-
simpsock.cc | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 248db8d..9a0c80a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -103,7 +103,7 @@ inilint_SOURCES = \
@SETUP@_LDADD = \
libgetopt++/libgetopt++.la -lgcrypt -lgpg-error -llzma -lbz2 -lz \
- -lshlwapi -lcomctl32 -lole32 -lwsock32 -lpsapi -luuid -lntdll -lwininet -lmingw32
+ -lshlwapi -lcomctl32 -lole32 -lws2_32 -lpsapi -luuid -lntdll -lwininet -lmingw32
@SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
@SETUP@_SOURCES = \
AntiVirus.cc \
diff --git a/nio-ftp.cc b/nio-ftp.cc
index 9f19189..171e3a2 100644
--- a/nio-ftp.cc
+++ b/nio-ftp.cc
@@ -26,7 +26,7 @@ static const char *cvsid =
#include "LogSingleton.h"
#include "win32.h"
-#include "winsock.h"
+#include <winsock2.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
diff --git a/nio-http.cc b/nio-http.cc
index 7336baf..259dc0f 100644
--- a/nio-http.cc
+++ b/nio-http.cc
@@ -22,7 +22,7 @@ static const char *cvsid =
#endif
#include "win32.h"
-#include "winsock.h"
+#include <winsock2.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/simpsock.cc b/simpsock.cc
index 852f043..88f843b 100644
--- a/simpsock.cc
+++ b/simpsock.cc
@@ -21,7 +21,7 @@ static const char *cvsid =
#endif
#include "win32.h"
-#include <winsock.h>
+#include <winsock2.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
--
2.6.2