public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-5072] Fix compilation of server.cc on hpux.
@ 2023-01-09 15:45 John David Anglin
  0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2023-01-09 15:45 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0925a9772960c946440833033423bff41c330154

commit r13-5072-g0925a9772960c946440833033423bff41c330154
Author: John David Anglin <danglin@gcc.gnu.org>
Date:   Mon Jan 9 15:41:51 2023 +0000

    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.

Diff:
---
 c++tools/server.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/c++tools/server.cc b/c++tools/server.cc
index eded5c50628..79905eca9ac 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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-09 15:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 15:45 [gcc r13-5072] Fix compilation of server.cc on hpux John David Anglin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).