PATCH: c++tools: fix compilation
Checks
Commit Message
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>
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(+)
@@ -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