From: Tom Lane Date: Sun, 16 Jul 2006 01:35:28 +0000 (+0000) Subject: Fix lack of repeat-inclusion guard in win32 substitute sys/socket.h. X-Git-Tag: REL8_2_BETA1~550 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=808849e54f20eb404adba4c87bf61159033f6005;p=thirdparty%2Fpostgresql.git Fix lack of repeat-inclusion guard in win32 substitute sys/socket.h. I think this explains the 'implicit declaration of function gai_strerror' warnings visible in the current buildfarm report from snake: if sys/socket.h is included again after getaddrinfo.h, the file would merrily undefine the gai_strerror macro. --- diff --git a/src/include/port/win32/sys/socket.h b/src/include/port/win32/sys/socket.h index ac64df8dd38..beec4e2f860 100644 --- a/src/include/port/win32/sys/socket.h +++ b/src/include/port/win32/sys/socket.h @@ -1,3 +1,9 @@ +/* + * $PostgreSQL: pgsql/src/include/port/win32/sys/socket.h,v 1.6 2006/07/16 01:35:28 tgl Exp $ + */ +#ifndef WIN32_SYS_SOCKET_H +#define WIN32_SYS_SOCKET_H + /* * Unfortunately, of VC++ also defines ERROR. * To avoid the conflict, we include here and undefine ERROR @@ -7,12 +13,14 @@ */ #include #include + #undef ERROR #undef small /* Restore old ERROR value */ #ifdef PGERROR #define ERROR PGERROR +#endif /* * we can't use the windows gai_strerror{AW} functions because @@ -21,4 +29,4 @@ */ #undef gai_strerror -#endif +#endif /* WIN32_SYS_SOCKET_H */