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.
This commit is contained in:
Claes Nästén 2022-03-14 20:04:49 +01:00 committed by Alan Coopersmith
parent 9e5a379610
commit 9554f1f208

View File

@ -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)