summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2011-01-04 09:42:04 -0500
committerAndrew Dunstan <andrew@dunslane.net>2011-01-04 09:42:04 -0500
commit1d1a43422252576e9a7fa07d8dbfea9c724aa75b (patch)
tree70043b0a827d410c07635a067dae5841ff4e3b54
parentd5b2587c20854044277c9616b8582b5f1f19d197 (diff)
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.
-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 06aece31dc4..c1775ea45bd 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -383,7 +383,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,