top: add -m ("memory") option
[oweals/busybox.git] / loginutils / getty.c
index 24a182ff4097c6a6780b1ffccc5f412536138c83..838adf2e76b116fe702ec12326a1c08256ae415d 100644 (file)
 #include <utmp.h> /* updwtmp() */
 #endif
 
+#ifndef IUCLC
+# define IUCLC 0
+#endif
+
 /*
  * Some heuristics to find out what environment we are in: if it is not
  * System V, assume it is SunOS 4.
@@ -235,7 +239,7 @@ static void open_tty(const char *tty)
 //             cur_dir_fd = xopen(".", O_DIRECTORY | O_NONBLOCK);
 //             xchdir("/dev");
 //             xstat(tty, &st);
-//             if ((st.st_mode & S_IFMT) != S_IFCHR)
+//             if (!S_ISCHR(st.st_mode))
 //                     bb_error_msg_and_die("%s: not a character device", tty);
 
                if (tty[0] != '/')