aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2011-01-04 09:41:18 -0500
committerAndrew Dunstan <andrew@dunslane.net>2011-01-04 09:41:18 -0500
commit3be03bae2c4c2b5035cef40be33e9ac688cafe17 (patch)
tree2affb0cdba046fc6a5bbfe182567a7ee062b84b6 /src
parent2892fd5dea8ceb871d590bd60e70759596bb0bd6 (diff)
downloadpostgresql-3be03bae2c4c2b5035cef40be33e9ac688cafe17.tar.gz
postgresql-3be03bae2c4c2b5035cef40be33e9ac688cafe17.zip
Work around header misdefines in modern Windows SDK when _WIN32_WINNT is less than 0x0501. Only required for versions 8.2, 8.3 and 8.4., as we defined _WIN32_WINNT as 0x0501 after that.
Diffstat (limited to 'src')
-rw-r--r--src/backend/libpq/pqcomm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index 14662e501f3..db79ca8eed3 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -361,7 +361,7 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
}
#endif
-#ifdef IPV6_V6ONLY
+#if defined(IPV6_V6ONLY) && defined(IPPROTO_IPV6)
if (addr->ai_family == AF_INET6)
{
if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY,