summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2000-04-14 00:51:58 +0000
committerTom Lane2000-04-14 00:51:58 +0000
commit07672d4e0ae887d4b06bdd01b03bbe64e8163bdf (patch)
treecad076db3990e088024f931bf967f12d003a034c
parentbf00aec8d057cfc1c0036660876968ce1f85fb9d (diff)
Skip setsockopt(SO_REUSEADDR) for the Unix-domain postmaster socket on
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.
-rw-r--r--src/backend/libpq/pqcomm.c8
-rw-r--r--src/include/port/sco.h2
2 files changed, 1 insertions, 9 deletions
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index 61c9e97b392..b761d34f415 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -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;
diff --git a/src/include/port/sco.h b/src/include/port/sco.h
index daba7b5a708..7a0e7556095 100644
--- a/src/include/port/sco.h
+++ b/src/include/port/sco.h
@@ -2,8 +2,6 @@
#define NOFILE NOFILES_MIN
#endif
-#define ONLY_REUSE_INET_SOCKETS
-
#define DISABLE_COMPLEX_MACRO
#define USE_POSIX_TIME