#ifdef TIOCGDEV
unsigned int kdev;
#endif
- struct stat st, st2;
+ struct stat st;
+ int n;
+#ifdef __linux__
char buf[256];
char *p;
+ struct stat st2;
int didmount = 0;
- int n, r;
+ int r;
int fd;
+#endif
fstat(0, &st);
if (major(st.st_rdev) != 5 || minor(st.st_rdev) != 1) {
}
#ifdef TIOCGDEV
+# ifndef ENOIOCTLCMD
+# define ENOIOCTLCMD 515
+# endif
if (ioctl(0, TIOCGDEV, &kdev) == 0) {
int r = findtty(res, "/dev", rlen, (dev_t)kdev);
if (0 != r)