From 139278b79fbcfc7cfd41ce2b9a7e87002f05e03f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 1 Nov 2011 22:45:49 +0100 Subject: [PATCH] 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 --- src/libssh2_priv.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h index 4f3708d..c670a16 100644 --- a/src/libssh2_priv.h +++ b/src/libssh2_priv.h @@ -44,7 +44,11 @@ #include "libssh2_config.h" #ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif #include +#undef WIN32_LEAN_AND_MEAN #endif #ifdef HAVE_WS2TCPIP_H