windows build: add define to avoid compiler warning

A recent mingw compiler has started to complain on "#warning Please
include winsock2.h before windows.h" unless the magic define is set
first.

Reported by: Vincent Torri
Bug: http://www.libssh2.org/mail/libssh2-devel-archive-2011-10/0064.shtml
This commit is contained in:
Daniel Stenberg 2011-11-01 22:45:49 +01:00
parent a0e13cc828
commit 139278b79f

View File

@ -44,7 +44,11 @@
#include "libssh2_config.h"
#ifdef HAVE_WINDOWS_H
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#endif
#ifdef HAVE_WS2TCPIP_H