Commit 07672d4e authored by Tom Lane's avatar Tom Lane

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.
parent bf00aec8
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * 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) ...@@ -205,11 +205,8 @@ StreamServerPort(char *hostName, unsigned short portName, int *fdP)
return STATUS_ERROR; return STATUS_ERROR;
} }
#ifdef ONLY_REUSE_INET_SOCKETS
if (family == AF_INET) if (family == AF_INET)
{ {
#endif
if ((setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &one, if ((setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &one,
sizeof(one))) == -1) sizeof(one))) == -1)
{ {
...@@ -220,10 +217,7 @@ StreamServerPort(char *hostName, unsigned short portName, int *fdP) ...@@ -220,10 +217,7 @@ StreamServerPort(char *hostName, unsigned short portName, int *fdP)
pqdebug("%s", PQerrormsg); pqdebug("%s", PQerrormsg);
return STATUS_ERROR; return STATUS_ERROR;
} }
#ifdef ONLY_REUSE_INET_SOCKETS
} }
#endif
MemSet((char *) &saddr, 0, sizeof(saddr)); MemSet((char *) &saddr, 0, sizeof(saddr));
saddr.sa.sa_family = family; saddr.sa.sa_family = family;
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
#define NOFILE NOFILES_MIN #define NOFILE NOFILES_MIN
#endif #endif
#define ONLY_REUSE_INET_SOCKETS
#define DISABLE_COMPLEX_MACRO #define DISABLE_COMPLEX_MACRO
#define USE_POSIX_TIME #define USE_POSIX_TIME
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment