--- showconsole-1.07/libconsole.c.orig	2004-12-03 21:57:24.507411240 -0500
+++ showconsole-1.07/libconsole.c	2004-12-03 21:59:26.820816776 -0500
@@ -1021,13 +1021,8 @@
     char * name = NULL;
     DIR * dev;
 
-#ifdef TIOCGDEV
+#define TIOCGDEV       _IOR('T',0x32, unsigned int)
     if (ioctl (0, TIOCGDEV, &tty) < 0) {
-	if (errno == EINVAL && !getenv("NOTIOCGDEV"))
-	    warn("Warning: the ioctl TIOCGDEV is not known by the kernel\n");
-#else
-#       error The ioctl TIOCGDEV is not defined (SuSE TIOCGDEV patch is missed)
-#endif
 	if (!(name = ttyname(0)) || !strcmp(name, "/dev/console"))
 	    tty = fallback(pid, ppid);
 	else {
@@ -1036,9 +1031,7 @@
 	    name = lnk;
 	    goto out;
 	}
-#ifdef TIOCGDEV
     }
-#endif
 
     if (!(dev = opendir("/dev")))
 	error("can not opendir(/dev): %s\n", STRERR);