From: Amos Jeffries Date: Wed, 11 Sep 2013 01:12:44 +0000 (-0600) Subject: Windows: locate CMSG definitions in WinSock2.h when present X-Git-Tag: SQUID_3_3_10~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=057926684cc21e14bef716993f62ad091b3d1b50;p=thirdparty%2Fsquid.git Windows: locate CMSG definitions in WinSock2.h when present Windows defines the CMSG macros in WinSock2.h sometimes. This allows the definitions there to be used when present and avoids compiler errors about double definitions. This is an iCelero project. --- diff --git a/compat/cmsg.h b/compat/cmsg.h index 17d63be04a..dc340e3703 100644 --- a/compat/cmsg.h +++ b/compat/cmsg.h @@ -9,6 +9,12 @@ #include #endif +// WinSock2.h defines these for Windows +#if HAVE_WINSOCK2_H +#include +#define CMSG_H_ // prevent re-definition +#endif + #ifndef CMSG_H_ #define CMSG_H_