From ad9dbd345dbec43ffc24481a0d21c261e49347fb Mon Sep 17 00:00:00 2001 From: Brian Cameron Date: Wed, 19 Sep 2007 21:19:31 -0400 Subject: don't use VT_GETSTATE when VT is unavailable --- src/ck-sysdeps-solaris.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ck-sysdeps-solaris.c b/src/ck-sysdeps-solaris.c index 9cfec2e..c0f333e 100644 --- a/src/ck-sysdeps-solaris.c +++ b/src/ck-sysdeps-solaris.c @@ -30,6 +30,10 @@ #include #include +#ifdef HAVE_SYS_VT_H +#include +#endif + #define DEV_ENCODE(M,m) ( \ ( (M&0xfff) << 8) | ( (m&0xfff00) << 12) | (m&0xff) \ ) @@ -432,6 +436,8 @@ ck_get_active_console_num (int console_fd, gboolean ret; int res; guint active; + +#ifdef VT_GETSTATE struct vt_stat stat; g_assert (console_fd != -1); @@ -464,6 +470,10 @@ ck_get_active_console_num (int console_fd, if (num != NULL) { *num = active; } +#else + res = ERROR; + errno = ENOTSUP; +#endif return ret; } -- cgit