From: John David Anglin Date: Mon, 9 Jan 2023 15:41:51 +0000 (+0000) Subject: Fix compilation of server.cc on hpux. X-Git-Tag: releases/gcc-12.5.0~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ea4b96173db521366cd5d62c125d4cb6c8f6065;p=thirdparty%2Fgcc.git 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 c++tools/ChangeLog: PR other/107616 * server.cc (server): Don't call FD_ISSET when HAVE_PSELECT and HAVE_SELECT are zero. --- diff --git a/c++tools/server.cc b/c++tools/server.cc index 00154a05925d..693aec6820a5 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)