--- src/consoles.c.original 2018-11-19 21:51:39.000000000 +0000 +++ src/consoles.c 2018-11-19 21:54:01.000000000 +0000 @@ -159,7 +159,7 @@ fd = dirfd(dir); rewinddir(dir); while ((dent = readdir(dir))) { - char path[PATH_MAX]; + char *path; struct stat st; if (fstatat(fd, dent->d_name, &st, 0) < 0) continue; @@ -167,9 +167,10 @@ continue; if (comparedev != st.st_rdev) continue; - if ((size_t)snprintf(path, sizeof(path), "/dev/%s", dent->d_name) >= sizeof(path)) + if (asprintf(&path, "/dev/%s", dent->d_name) < 0) continue; name = realpath(path, NULL); + free(path); break; } return name; --- src/sulogin.c.original 2018-11-19 21:50:11.000000000 +0000 +++ src/sulogin.c 2018-11-19 21:51:15.000000000 +0000 @@ -144,7 +144,9 @@ cfsetispeed(tio, ispeed); cfsetospeed(tio, ospeed); +#ifndef __GNU__ tio->c_line = 0; +#endif tio->c_cc[VTIME] = 0; tio->c_cc[VMIN] = 1; @@ -203,7 +205,7 @@ tio->c_cc[VEOF] = CEOF; # ifdef VSWTC tio->c_cc[VSWTC] = _POSIX_VDISABLE; -# else +# elif defined(VSWTCH) tio->c_cc[VSWTCH] = _POSIX_VDISABLE; # endif tio->c_cc[VSTART] = CSTART; @@ -261,7 +263,7 @@ tio->c_cc[VEOF] = CEOF; #ifdef VSWTC tio->c_cc[VSWTC] = _POSIX_VDISABLE; -#else +#elif defined(VSWTCH) tio->c_cc[VSWTCH] = _POSIX_VDISABLE; #endif tio->c_cc[VSTART] = CSTART;