From 9554f1f208ed936371036e3054bcded4a71316b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Claes=20N=C3=A4st=C3=A9n?= Date: Mon, 14 Mar 2022 20:04:49 +0100 Subject: [PATCH] xfree86: #ifdef HAS_USL_VTS for switch_to under Solaris switch_to() is only used from #ifdef HAS_USL_VTS code, place it inside ifdefs to to avoid unused static warning and compile error on systems without VT_ACTIVATE and VT_WAITACTIVE defines. --- hw/xfree86/os-support/solaris/sun_init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c index cc50f36c4..d7bf2e54b 100644 --- a/hw/xfree86/os-support/solaris/sun_init.c +++ b/hw/xfree86/os-support/solaris/sun_init.c @@ -61,6 +61,7 @@ static char consoleDev[PATH_MAX] = "/dev/fb"; Used by hw/xfree86/common/xf86AutoConfig.c for VIS_GETIDENTIFIER */ _X_HIDDEN char xf86SolarisFbDev[PATH_MAX] = "/dev/fb"; +#ifdef HAS_USL_VTS static void switch_to(int vt, const char *from) { @@ -76,6 +77,7 @@ switch_to(int vt, const char *from) xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno)); } +#endif void xf86OpenConsole(void)