From 6ee023cf629c83af8d10b383ab0780ec043f0785 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 23 Aug 2007 10:52:52 +0000 Subject: *: compile fixes for 64-bit build --- console-tools/chvt.c | 7 ++++--- console-tools/deallocvt.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'console-tools') diff --git a/console-tools/chvt.c b/console-tools/chvt.c index 86d3f2ddb..b1f81a20e 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c @@ -25,8 +25,9 @@ int chvt_main(int argc, char **argv) } fd = get_console_fd(); - num = xatoul_range(argv[1], 1, 63); - xioctl(fd, VT_ACTIVATE, (void *)num); - xioctl(fd, VT_WAITACTIVE, (void *)num); + num = xatou_range(argv[1], 1, 63); + /* double cast suppresses "cast to ptr from int of different size */ + xioctl(fd, VT_ACTIVATE, (void *)(ptrdiff_t)num); + xioctl(fd, VT_WAITACTIVE, (void *)(ptrdiff_t)num); return EXIT_SUCCESS; } diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index a69026664..bf2bac186 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c @@ -23,7 +23,7 @@ int deallocvt_main(int argc, char **argv) switch (argc) { case 2: - num = xatoul_range(argv[1], 1, 63); + num = xatou_range(argv[1], 1, 63); /* Fallthrough */ case 1: break; @@ -31,6 +31,7 @@ int deallocvt_main(int argc, char **argv) bb_show_usage(); } - xioctl(get_console_fd(), VT_DISALLOCATE, (void *)num); + /* double cast suppresses "cast to ptr from int of different size */ + xioctl(get_console_fd(), VT_DISALLOCATE, (void *)(ptrdiff_t)num); return EXIT_SUCCESS; } -- cgit v1.2.3