patch 9.0.2052: win32: using deprecated wsock32 api
Problem: win32: using deprecated wsock32 api
Solution: Use winsock2 (ws2_32) consistently
win32: Stop using wsock32
We have already used ws2_32 (winsock2) and already dropped support for
Windows 95 and NT4. So, we don't need to care about wsock32.
Use ws2_32 consistently.
closes: #13383
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
diff --git a/src/os_win32.h b/src/os_win32.h
index 87555b7..5995e70 100644
--- a/src/os_win32.h
+++ b/src/os_win32.h
@@ -85,6 +85,10 @@
# define COBJMACROS // For OLE: Enable "friendlier" access to objects
#endif
#ifndef PROTO
+// Must include winsock2.h before windows.h since it conflicts with winsock.h
+// (included in windows.h).
+# include <winsock2.h>
+# include <ws2tcpip.h>
# include <windows.h>
// Weird: rpcndr.h defines "small" to "char", which causes trouble