From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dellerweb.de (dellerweb.de [173.249.48.176]) by sourceware.org (Postfix) with ESMTPS id BD9B93858D35 for ; Sat, 7 Jan 2023 19:12:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD9B93858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bell.net Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=bell.net Received: from mx3210.localdomain (lgston2802w-grc-01-216-208-213-126.dsl.bell.ca [216.208.213.126]) by dellerweb.de (Postfix) with ESMTPSA id 71423160016E; Sat, 7 Jan 2023 20:12:44 +0100 (CET) Received: by mx3210.localdomain (Postfix, from userid 1000) id 9931E220133; Sat, 7 Jan 2023 19:12:42 +0000 (UTC) Date: Sat, 7 Jan 2023 19:12:42 +0000 From: John David Anglin To: GCC Patches Cc: Nathan Sidwell Subject: [PATCH] c++tools: Fix compilation of server.cc on hpux Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aTHCHHlPQ0rV9gO6" Content-Disposition: inline X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --aTHCHHlPQ0rV9gO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 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 *resol= ver) } } =20 +#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) if (active < 0 && sock_fd >=3D 0 && FD_ISSET (sock_fd, &readers)) active =3D -1; +#endif } =20 if (active >=3D 0) --aTHCHHlPQ0rV9gO6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEnRzl+6e9+DTrEhyEXb/Nrl8ZTfEFAmO5xCIACgkQXb/Nrl8Z TfF3jg//ZMJIAyNq5d2dAbMyUyTG2OgqMed/Edn1lBHUgejvDh9y7WkUiju9mRCJ Up3c6nSEqOeLHEmR6PblqEOpT7YoqviTIN/n+jq8fUXwM3cTzWjP4EYojviYrRII ZhwP2ZGPaZZshpKPg/AAB6xjYLFIhTfrK+XJCBhmljH4DemPaLi1wqFVgRNa1OmW JNlurCmxpTLP62ENGTFPkaghhrHGMqSM7gpdqiz5oB9tZlpcVq1gjtDbLN7ijtfo fq/kC0BGUPzO3xcjt6JAvF+nYt2TZPXr0VUoTpcqFtGAjv+G7opE55SglAJofo6l kK8enW8pvsrc6Y+BhEzEZCefJex0UAuWqaRpdXnSOFKVfYYTfJKx6DmS2vjhoMIG KiyUIPa2HN84oAr5DbHfZtTNIt1K7dZ6tAARfQy1ROk/owuj3SYnnlu7wAeeI7gl ts7CoSHlh2jDnjpsD4jE1k4sLDz5yhxb7rQbUF3LOAGQspSU38QRXKb/gbWGghkZ 42hIxusZvcY+7zXwdX1f2xDZzB/mlRVu7GA5wkCI49jzLKXZebFOqZyq470grDTq N6hQt2SGL4bLkT1MbLsRjueQBncY6GxuzzsLA7ykE+TlvmaVLkArs7eonjEsCVac FD2+KaLVDr4QAIromo3RVUeCSOu1rjgEbXosrtoNNwgYQ6Zqdog= =AFP1 -----END PGP SIGNATURE----- --aTHCHHlPQ0rV9gO6--