1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Finished merging in src/backend from Dr. George's source tree

This commit is contained in:
Marc G. Fournier
1996-07-23 02:23:54 +00:00
parent e11744e164
commit 7344d69898
9 changed files with 150 additions and 25 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.1.1.1 1996/07/09 06:21:31 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.2 1996/07/23 02:23:25 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -551,6 +551,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
{
struct sockaddr_in sin;
int fd;
int one = 1;
#ifdef WIN32
/* This is necessary to make it possible for a backend to use
@ -575,7 +576,17 @@ StreamServerPort(char *hostName, short portName, int *fdP)
pqdebug("%s", PQerrormsg);
return(STATUS_ERROR);
}
if((setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&one,
sizeof(one))) == -1) {
(void) sprintf(PQerrormsg,
"FATAL: StreamServerPort: setsockopt (SO_REUSEADDR) failed: errno=%d\n",
errno);
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
return(STATUS_ERROR);
}
sin.sin_family = AF_INET;
sin.sin_port = htons(portName);