diff options
Diffstat (limited to 'console-tools')
-rw-r--r-- | console-tools/showkey.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/console-tools/showkey.c b/console-tools/showkey.c index e4603e2d3..95db6e16e 100644 --- a/console-tools/showkey.c +++ b/console-tools/showkey.c | |||
@@ -50,7 +50,7 @@ static void signal_handler(int signo) | |||
50 | { | 50 | { |
51 | // restore keyboard and console settings | 51 | // restore keyboard and console settings |
52 | xset1(STDIN_FILENO, &tio0, "stdin"); | 52 | xset1(STDIN_FILENO, &tio0, "stdin"); |
53 | xioctl(STDIN_FILENO, KDSKBMODE, (void *)kbmode); | 53 | xioctl(STDIN_FILENO, KDSKBMODE, (void *)(ptrdiff_t)kbmode); |
54 | // alarmed? -> exit 0 | 54 | // alarmed? -> exit 0 |
55 | exit(SIGALRM == signo); | 55 | exit(SIGALRM == signo); |
56 | } | 56 | } |
@@ -95,7 +95,7 @@ int showkey_main(int argc UNUSED_PARAM, char **argv) | |||
95 | // we should exit on any signal | 95 | // we should exit on any signal |
96 | bb_signals(BB_FATAL_SIGS, signal_handler); | 96 | bb_signals(BB_FATAL_SIGS, signal_handler); |
97 | // set raw keyboard mode | 97 | // set raw keyboard mode |
98 | xioctl(STDIN_FILENO, KDSKBMODE, (void *)((option_mask32 & OPT_k) ? K_MEDIUMRAW : K_RAW)); | 98 | xioctl(STDIN_FILENO, KDSKBMODE, (void *)(ptrdiff_t)((option_mask32 & OPT_k) ? K_MEDIUMRAW : K_RAW)); |
99 | 99 | ||
100 | // read and show scancodes | 100 | // read and show scancodes |
101 | while (1) { | 101 | while (1) { |