From 0145691112f14352ef15b49c1ea3079a8e80f6e8 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Tue, 21 Aug 2007 11:27:04 -0400 Subject: more solaris support based on patch from Brian Cameron. --- src/ck-vt-monitor.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/ck-vt-monitor.c') diff --git a/src/ck-vt-monitor.c b/src/ck-vt-monitor.c index 4291bdd..5c37a64 100644 --- a/src/ck-vt-monitor.c +++ b/src/ck-vt-monitor.c @@ -29,11 +29,6 @@ #include #include -#if defined (__linux__) -#include -#include -#endif /* linux */ - #include #include #include @@ -358,6 +353,7 @@ vt_add_watch_unlocked (CkVtMonitor *vt_monitor, static void vt_add_watches (CkVtMonitor *vt_monitor) { + guint max_consoles; int i; gint32 current_num; @@ -365,7 +361,13 @@ vt_add_watches (CkVtMonitor *vt_monitor) current_num = vt_monitor->priv->active_num; - for (i = 1; i < MAX_NR_CONSOLES; i++) { + max_consoles = 1; + + if (! ck_get_max_num_consoles (&max_consoles)) { + /* FIXME: this can fail on solaris */ + } + + for (i = 1; i < max_consoles; i++) { gpointer id; /* don't wait on the active vc */ -- cgit