Skip setsockopt(SO_REUSEADDR) for the Unix-domain postmaster socket on
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 14 Apr 2000 00:51:58 +0000 (00:51 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 14 Apr 2000 00:51:58 +0000 (00:51 +0000)
all platforms, not just SCO.  The operation is undefined for Unix-domain
sockets anyway.  It seems SCO is not the only platform that complains
instead of treating the call as a no-op.

src/backend/libpq/pqcomm.c
src/include/port/sco.h

index 61c9e97b39229d029b158adea6e3fa3cc9a59e21..b761d34f4159c55b8401b6d387cda5607c15d1df 100644 (file)
@@ -29,7 +29,7 @@
  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pqcomm.c,v 1.88 2000/04/12 17:15:14 momjian Exp $
+ * $Id: pqcomm.c,v 1.89 2000/04/14 00:51:58 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -205,11 +205,8 @@ StreamServerPort(char *hostName, unsigned short portName, int *fdP)
        return STATUS_ERROR;
    }
 
-#ifdef ONLY_REUSE_INET_SOCKETS
    if (family == AF_INET)
    {
-#endif
-
        if ((setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &one,
                        sizeof(one))) == -1)
        {
@@ -220,10 +217,7 @@ StreamServerPort(char *hostName, unsigned short portName, int *fdP)
            pqdebug("%s", PQerrormsg);
            return STATUS_ERROR;
        }
-
-#ifdef ONLY_REUSE_INET_SOCKETS
    }
-#endif
 
    MemSet((char *) &saddr, 0, sizeof(saddr));
    saddr.sa.sa_family = family;
index daba7b5a708156e366bd24cd91be68801d9d42a1..7a0e7556095eb1e7a71ec145584cf9472be9ff3e 100644 (file)
@@ -2,8 +2,6 @@
 #define NOFILE         NOFILES_MIN
 #endif
 
-#define ONLY_REUSE_INET_SOCKETS
-
 #define DISABLE_COMPLEX_MACRO
 
 #define USE_POSIX_TIME