aboutsummaryrefslogtreecommitdiff
path: root/c++tools
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2023-01-09 15:41:51 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2023-01-09 15:44:42 +0000
commit0925a9772960c946440833033423bff41c330154 (patch)
tree9d9a5f698764e8c76e7b82602f3a07644a2e2dbc /c++tools
parentcccef0517f3a73f638a96ee879e94ff2bece7298 (diff)
downloadgcc-0925a9772960c946440833033423bff41c330154.zip
gcc-0925a9772960c946440833033423bff41c330154.tar.gz
gcc-0925a9772960c946440833033423bff41c330154.tar.bz2
Fix compilation of server.cc on hpux.
Select and FD_ISSET are declared in sys/time.h on most versions of hpux. As a result, HAVE_PSELECT and HAVE_SELECT can be 0. 2023-01-08 John David Anglin <danglin@gcc.gnu.org> c++tools/ChangeLog: PR other/107616 * server.cc (server): Don't call FD_ISSET when HAVE_PSELECT and HAVE_SELECT are zero.
Diffstat (limited to 'c++tools')
-rw-r--r--c++tools/server.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/c++tools/server.cc b/c++tools/server.cc
index eded5c5..79905ec 100644
--- a/c++tools/server.cc
+++ b/c++tools/server.cc
@@ -753,8 +753,10 @@ server (bool ipv6, int sock_fd, module_resolver *resolver)
}
}
+#if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
if (active < 0 && sock_fd >= 0 && FD_ISSET (sock_fd, &readers))
active = -1;
+#endif
}
if (active >= 0)