Silence compiler warning on mingw
authorMagnus Hagander <magnus@hagander.net>
Tue, 24 Jul 2007 11:16:36 +0000 (11:16 +0000)
committerMagnus Hagander <magnus@hagander.net>
Tue, 24 Jul 2007 11:16:36 +0000 (11:16 +0000)
src/backend/libpq/pqcomm.c

index 0e6fc2ec1cb39c540be1f79f8d620e6740a043cb..e0a027d5053c05c920d7a222397883d39c8b9977 100644 (file)
@@ -245,7 +245,6 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
        int                     fd,
                                err;
        int                     maxconn;
-       int                     one = 1;
        int                     ret;
        char            portNumberStr[32];
        const char *familyDesc;
@@ -256,6 +255,9 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
        struct addrinfo hint;
        int                     listen_index = 0;
        int                     added = 0;
+#if !defined(WIN32) || defined(IPV6_V6ONLY)
+       int                     one = 1;
+#endif
 
        /* Initialize hint structure */
        MemSet(&hint, 0, sizeof(hint));