From 07672d4e0ae887d4b06bdd01b03bbe64e8163bdf Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 14 Apr 2000 00:51:58 +0000 Subject: [PATCH] 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. --- src/backend/libpq/pqcomm.c | 8 +------- src/include/port/sco.h | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index 61c9e97b39..b761d34f41 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 daba7b5a70..7a0e755609 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 -- GitLab