From patchwork Thu Oct 20 16:33:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guillaume Gomez X-Patchwork-Id: 6298 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp207286wrr; Thu, 20 Oct 2022 09:35:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6B6Qu568P9+FFFXj9f2M7MwR04MB91JYwPa8g5VAxl/Hzcd852pLTJaOkCJzy5OAheiXLn X-Received: by 2002:a05:6402:5206:b0:45d:88f:4f00 with SMTP id s6-20020a056402520600b0045d088f4f00mr13139826edd.130.1666283709015; Thu, 20 Oct 2022 09:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666283709; cv=none; d=google.com; s=arc-20160816; b=pRCqe2n9fHSRZfErDfC9LJS4s+ufL/N7jrfLXn8jZhBfLqjpshjc5RVntn8BA79krf Qhqca/fQXygtkQ38alnXl5rYXr5wLarqxkdXI93Y44s9JsE/hu0VZzromMBhDhONvYb+ iJ4fks3h7ETF27XQfKVusWuqouPUxmyZgoTd1dibnK291fuatRddicMlj9l+Hglz39VP R/OSO15WTQpIappOxs3jF942b3n9H516sAA3rDEJLS95rMhxE2WOAr1u0znX83wImxAu xCbcmXMYzt5S2rdViImhJjYZ7Ui2ZWB/5XTeteNNsyVDtQ6ETe566ltgYxNUZsGfg9hc zMwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:to:subject :message-id:date:mime-version:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=Ozu5g+s3xSfxt6h1ys/9o4FUgc7n/Vfv0PVhADj6sN4=; b=dXgA3V6NY4TN/tRdyIttLtLM0Z+IDuv7jqs+fkE97287Z3PqInuwgZXt0FR+g7hdWe Nut/naKcgjthnLKF2HfvrvMoWJx8Vkpl/L734uNYFZ1QX1LQ/W8bqwQf3ILKHCqXPi8T xpvebH2VjxoNAhmv7CRuLp7opr1W000qhGqBejx3R5MRvTRW9iPXq6JLKL2SGyZLzHhC 8yGi4DnNlWGgWG+LlKfzijukH+ugFj3O91N7mJmhvsp4MuNvkkPsUifUH3OpkOJaW+Yl v3Bu8wffMg+kZj1QU6NCA85ZgmCLyBPR1lOygG8KttmUrQHD/+nTMs/JmRzhTfxn1ShZ uOlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=MbcDMBFM; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id u8-20020a056402064800b00458cdba7a90si14760770edx.471.2022.10.20.09.35.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 09:35:09 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=MbcDMBFM; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C1379384D1B8 for ; Thu, 20 Oct 2022 16:35:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C1379384D1B8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666283707; bh=Ozu5g+s3xSfxt6h1ys/9o4FUgc7n/Vfv0PVhADj6sN4=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=MbcDMBFM+EKOaD5ILgSySE78YKvu0w3dDmXl4b/K7c5SnLFAm1zdOo5jMDy4xome5 3PXiqOjuIcgb9tYAUh5vydNCzXpsfqnCbZYlBc6s9OtCrcHMijhnJXb72rR/z2b4lJ +K5Qghcn5oS2Khiybj3UCRAL7BCEO4Ix1uqnAxXA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id DAD1F384F01B; Thu, 20 Oct 2022 16:33:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DAD1F384F01B Received: by mail-wr1-x42a.google.com with SMTP id i9so2360437wrv.5; Thu, 20 Oct 2022 09:33:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=UWJzoxsLfPktTfSGVztq2tBFPLdq0l/SEvu+U7COlME=; b=sDKUCZF0NAURn3u5Hs4ogL9CjRrBWkhgfx0w+EY0ZaF9A+40h4cx5zgBARFT6Em59b QEbHAMyE+g5zDRWOkYVU3sItAkag1qdlMzleUjilR0SHw55UbvCueF+9pRwFzP4iem0j GXki72B1NSoaFJGkFndibnyowMhPvCLy5gR4JFXBjLfhS2xysSh8EncN1yHMIMNQOMIs CKXlR9RukydfyvtHUanw0J6aIyMCUVzrUIEJ+eRG2tXGxwxGkTewI+0heW0K/UxhmHPb Oqc3D9rMVw/Ts8nSGSRPqiMhMZ7ORNaXnBiMLW6jsNo2tX1s5Po1EgT/uNlw/Cq+IbRn xVog== X-Gm-Message-State: ACrzQf0ScRGvrgIk5HJ6pJKPDW6+OP+izLtNBZNc48R6skPBvyZKnMxX YUxhq/1mz3eTv8hyPTcQicR40Z4s+peR3dw/RACwrkyrPGMaF9B0 X-Received: by 2002:a5d:4ec5:0:b0:22c:dca3:e84d with SMTP id s5-20020a5d4ec5000000b0022cdca3e84dmr9050943wrv.14.1666283631179; Thu, 20 Oct 2022 09:33:51 -0700 (PDT) MIME-Version: 1.0 Date: Thu, 20 Oct 2022 18:33:40 +0200 Message-ID: Subject: PATCH: c++tools: fix compilation To: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Guillaume Gomez via Gcc-patches From: Guillaume Gomez Reply-To: Guillaume Gomez Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747225106491819022?= X-GMAIL-MSGID: =?utf-8?q?1747225106491819022?= Hi, This patch fixes the following compilation error: ../.././c++tools/server.cc: In function ‘void server(bool, int, module_resolver*)’: ../.././c++tools/server.cc:756:69: error: ‘readers’ was not declared in this scope; did you mean ‘read’? 756 | if (active < 0 && sock_fd >= 0 && FD_ISSET (sock_fd, &readers)) | ^~~~~~~ It was missing a preprocessor condition around this code to work as the "readers" variable is created only in a preprocessor condition. Signed-off-by: Guillaume Gomez From 39279d8b37287c09708d910921ce5cfa5b87ac01 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 20 Oct 2022 18:18:52 +0200 Subject: [PATCH] Add missing preprocessor condition to fix c++tools/server.cc file compilation --- c++tools/server.cc | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.34.1