]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
sig.c: define signal_handler on non-windows only
authorAntonio Quartulli <a@unstable.cc>
Thu, 13 Jan 2022 10:14:34 +0000 (11:14 +0100)
committerGert Doering <gert@greenie.muc.de>
Fri, 14 Jan 2022 06:59:26 +0000 (07:59 +0100)
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 <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
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 <gert@greenie.muc.de>
src/openvpn/sig.c

index eadd71091b4e38d343395603507fdf0b30e0f1a5..9747c083b6d86abcc3a1c8b7d12bf7e5fac69f47 100644 (file)
@@ -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 */