From 508ee74a9671d0175afeeb1711ba0f18d538cfb2 Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Thu, 13 Jan 2022 11:14:34 +0100 Subject: [PATCH] sig.c: define signal_handler on non-windows only signal_handler() is unused on Windows and generates a warning. Confine it within "ifdef _WIN32" in order to reduce the compilation noise. Signed-off-by: Antonio Quartulli Acked-by: Gert Doering Message-Id: <20220113101434.30223-1-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23530.html Signed-off-by: Gert Doering --- src/openvpn/sig.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openvpn/sig.c b/src/openvpn/sig.c index eadd7109..9747c083 100644 --- a/src/openvpn/sig.c +++ b/src/openvpn/sig.c @@ -214,7 +214,7 @@ signal_restart_status(const struct signal_info *si) #endif /* ifdef ENABLE_MANAGEMENT */ } - +#ifndef _WIN32 /* normal signal handler, when we are in event loop */ static void signal_handler(const int signum) @@ -222,6 +222,7 @@ signal_handler(const int signum) throw_signal(signum); signal(signum, signal_handler); } +#endif /* set handlers for unix signals */