diff -Nru kbd-1.15.5/debian/changelog kbd-1.15.5/debian/changelog --- kbd-1.15.5/debian/changelog 2015-09-16 19:06:41.000000000 +0000 +++ kbd-1.15.5/debian/changelog 2016-09-20 17:55:51.000000000 +0000 @@ -1,3 +1,11 @@ +kbd (1.15.5-1ubuntu5) xenial; urgency=medium + + * debian/patches/loadkeys_find_usable_console.diff: fix wrong type argument + to ioctl(..., KDGKBMODE), which causes consoles to not be correctly + detected on 64-bit archs. LP: #1621824. + + -- Steve Langasek Tue, 20 Sep 2016 10:55:50 -0700 + kbd (1.15.5-1ubuntu4) wily; urgency=medium * debian/conffiles.d/config: Disable automatic virtual console screen blank diff -Nru kbd-1.15.5/debian/patches/loadkeys_find_usable_console.diff kbd-1.15.5/debian/patches/loadkeys_find_usable_console.diff --- kbd-1.15.5/debian/patches/loadkeys_find_usable_console.diff 2015-03-04 14:38:34.000000000 +0000 +++ kbd-1.15.5/debian/patches/loadkeys_find_usable_console.diff 2016-09-20 17:55:02.000000000 +0000 @@ -4,21 +4,22 @@ console might be in raw mode, for example if Plymouth or X might be running. Author: Colin Watson +Author: Steve Langasek Forwarded: no -Last-Update: 2013-02-18 +Last-Update: 2016-09-20 -Index: b/src/getfd.c +Index: kbd-1.15.5/src/getfd.c =================================================================== ---- a/src/getfd.c -+++ b/src/getfd.c +--- kbd-1.15.5.orig/src/getfd.c ++++ kbd-1.15.5/src/getfd.c @@ -86,3 +86,56 @@ /* total failure */ exit(1); } + -+static long ++static int +kbmode(int fd) { -+ long mode; ++ int mode; + + if (ioctl(fd, KDGKBMODE, &mode) < 0) + return -1; @@ -38,7 +39,7 @@ + +#define CHECK_FD_KEYMAP do { \ + if (is_a_console(fd)) { \ -+ long mode = kbmode(fd); \ ++ int mode = kbmode(fd); \ + if (mode == K_UNICODE) { \ + if (bestfd != -1) \ + close(bestfd); \ @@ -68,10 +69,10 @@ + /* total failure */ + exit(1); +} -Index: b/src/getfd.h +Index: kbd-1.15.5/src/getfd.h =================================================================== ---- a/src/getfd.h -+++ b/src/getfd.h +--- kbd-1.15.5.orig/src/getfd.h ++++ kbd-1.15.5/src/getfd.h @@ -2,5 +2,6 @@ #define _GETFD_H @@ -79,10 +80,10 @@ +extern int getfd_keymap(void); #endif /* _GETFD_H */ -Index: b/src/loadkeys.y +Index: kbd-1.15.5/src/loadkeys.y =================================================================== ---- a/src/loadkeys.y -+++ b/src/loadkeys.y +--- kbd-1.15.5.orig/src/loadkeys.y ++++ kbd-1.15.5/src/loadkeys.y @@ -1149,7 +1149,10 @@ }