From: Guillaume Gomez <guillaume1.gomez@gmail.com>
To: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org
Subject: PATCH: c++tools: fix compilation
Date: Thu, 20 Oct 2022 18:33:40 +0200 [thread overview]
Message-ID: <CAAOQCfSSoVe+gmnco1uwJiE6=VFHboNXweEehqLsw763c5OwwA@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 580 bytes --]
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 <guillaume1.gomez@gmail.com>
[-- Attachment #2: 0001-Add-missing-preprocessor-condition-to-fix-c-tools-se.patch --]
[-- Type: text/x-patch, Size: 755 bytes --]
From 39279d8b37287c09708d910921ce5cfa5b87ac01 Mon Sep 17 00:00:00 2001
From: Guillaume Gomez <guillaume1.gomez@gmail.com>
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
reply other threads:[~2022-10-20 16:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAOQCfSSoVe+gmnco1uwJiE6=VFHboNXweEehqLsw763c5OwwA@mail.gmail.com' \
--to=guillaume1.gomez@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jit@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).