Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 07672d4

Browse files
committed
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.
1 parent bf00aec commit 07672d4

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/backend/libpq/pqcomm.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
3030
* Portions Copyright (c) 1994, Regents of the University of California
3131
*
32-
* $Id: pqcomm.c,v 1.88 2000/04/12 17:15:14 momjian Exp $
32+
* $Id: pqcomm.c,v 1.89 2000/04/14 00:51:58 tgl Exp $
3333
*
3434
*-------------------------------------------------------------------------
3535
*/
@@ -205,11 +205,8 @@ StreamServerPort(char *hostName, unsigned short portName, int *fdP)
205205
return STATUS_ERROR;
206206
}
207207

208-
#ifdef ONLY_REUSE_INET_SOCKETS
209208
if (family == AF_INET)
210209
{
211-
#endif
212-
213210
if ((setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &one,
214211
sizeof(one))) == -1)
215212
{
@@ -220,10 +217,7 @@ StreamServerPort(char *hostName, unsigned short portName, int *fdP)
220217
pqdebug("%s", PQerrormsg);
221218
return STATUS_ERROR;
222219
}
223-
224-
#ifdef ONLY_REUSE_INET_SOCKETS
225220
}
226-
#endif
227221

228222
MemSet((char *) &saddr, 0, sizeof(saddr));
229223
saddr.sa.sa_family = family;

src/include/port/sco.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#define NOFILE NOFILES_MIN
33
#endif
44

5-
#define ONLY_REUSE_INET_SOCKETS
6-
75
#define DISABLE_COMPLEX_MACRO
86

97
#define USE_POSIX_TIME

0 commit comments

Comments
 (0)