public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] c++tools: Fix compilation of server.cc on hpux
@ 2023-01-07 19:12 John David Anglin
  2023-01-09 11:14 ` Nathan Sidwell
  0 siblings, 1 reply; 2+ messages in thread
From: John David Anglin @ 2023-01-07 19:12 UTC (permalink / raw)
  To: GCC Patches; +Cc: Nathan Sidwell

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

Tested on trunk and gcc-12 with hppa64-hp-hpux11.11.

Okay?

Dave
---

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-07  John David Anglin  <danglin@gcc.gnu.org>

c++tools/ChangeLog:

	PR c++tools/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 00154a05925..693aec6820a 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)


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-09 11:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-07 19:12 [PATCH] c++tools: Fix compilation of server.cc on hpux John David Anglin
2023-01-09 11:14 ` Nathan Sidwell

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).