Signed-off-by: James Clarke <jrtc27@xxxxxxxxxx> --- login-utils/sulogin-consoles.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/login-utils/sulogin-consoles.c b/login-utils/sulogin-consoles.c index 39d24d2..1b05b38 100644 --- a/login-utils/sulogin-consoles.c +++ b/login-utils/sulogin-consoles.c @@ -612,6 +612,14 @@ int detect_consoles(const char *device, int fallback, struct list_head *consoles #ifdef TIOCGDEV unsigned int devnum; #endif +#ifdef __GNU__ + /* + * The Hurd always gives st_rdev as 0, which causes this + * method to select the first terminal it finds. + */ + close(fd); + goto fallback; +#endif DBG(dbgprint("trying device/fallback file descriptor")); if (fstat(fd, &st) < 0) { -- 2.5.3 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html