Enable Winsock 2 and IPv6 build options by default
In addition to linking with Winsock 2, also use winsock2.h. This allows to turn on IPv6 support on by default under MSW, so turn it on under Unix too for consistency. Predefine _WINSOCK_DEPRECATED_NO_WARNINGS to avoid warnings about deprecated (but still available and very unlikely to be ever removed) Winsock 1 functions that we still use.
This commit is contained in:
@@ -32,6 +32,12 @@
|
||||
// support, for example), we must include it before winsock.h, and as windows.h
|
||||
// includes winsock.h, we have to do it before including it.
|
||||
#if wxUSE_WINSOCK2
|
||||
// Avoid warnings about Winsock 1.x functions deprecated in Winsock 2 that
|
||||
// we still use (and that will certainly remain available for the
|
||||
// foreseeable future anyhow).
|
||||
#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||
#define _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||
#endif
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user