You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-admin/showconsole/files/1.07-no-TIOCGDEV.patch

28 lines
819 B

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