Commit 5041cdf2 authored by Tom Lane's avatar Tom Lane

Partially revert commit 536d47bd.

Per buildfarm, the "#ifdef F_SETFD" removed in that commit actually
is needed on Windows, because fcntl() isn't available at all on that
platform, unless using Cygwin.  We could perhaps spell it more like
"#ifdef HAVE_FCNTL", or "#ifndef WIN32", but it's not clear that
those choices are better.

It does seem that we don't need the bogus manual definition of
FD_CLOEXEC, though, so keep that change.

Discussion: https://postgr.es/m/26254.1492805635@sss.pgh.pa.us
parent f58b6643
......@@ -1983,6 +1983,7 @@ keep_going: /* We will come back to here until there is
continue;
}
#ifdef F_SETFD
if (fcntl(conn->sock, F_SETFD, FD_CLOEXEC) == -1)
{
appendPQExpBuffer(&conn->errorMessage,
......@@ -1992,6 +1993,7 @@ keep_going: /* We will come back to here until there is
conn->addr_cur = addr_cur->ai_next;
continue;
}
#endif /* F_SETFD */
if (!IS_AF_UNIX(addr_cur->ai_family))
{
......
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