diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2015-08-17 18:09:17 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2015-08-17 18:09:17 +0300 |
commit | 84b0ad63fbe5f0de38ae642060a96db34e14287f (patch) | |
tree | 372cf86634b40d036fec188acedb38fb5715937a /src/os/win32/ngx_win32_config.h | |
parent | 1576cd10aabf94e02e65a900302c87c3c149c265 (diff) | |
download | nginx-84b0ad63fbe5f0de38ae642060a96db34e14287f.tar.gz nginx-84b0ad63fbe5f0de38ae642060a96db34e14287f.zip |
Win32: MSVC 2015 compatibility.
Resolved warnings about declarations that hide previous local declarations.
Warnings about WSASocketA() being deprecated resolved by explicit use of
WSASocketW() instead of WSASocket(). When compiling without IPv6 support,
WinSock deprecated warnings are disabled to allow use of gethostbyname().
Diffstat (limited to 'src/os/win32/ngx_win32_config.h')
-rw-r--r-- | src/os/win32/ngx_win32_config.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/os/win32/ngx_win32_config.h b/src/os/win32/ngx_win32_config.h index 36a486fa8..f5b5950bb 100644 --- a/src/os/win32/ngx_win32_config.h +++ b/src/os/win32/ngx_win32_config.h @@ -21,6 +21,11 @@ #define _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_DEPRECATE +/* enable gethostbyname() in msvc2015 */ +#if !(NGX_HAVE_INET6) +#define _WINSOCK_DEPRECATED_NO_WARNINGS +#endif + /* * we need to include <windows.h> explicitly before <winsock2.h> because * the warning 4201 is enabled in <windows.h> |