aboutsummaryrefslogtreecommitdiff
path: root/console-tools/chvt.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-08-23 10:52:52 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-08-23 10:52:52 +0000
commit6ee023cf629c83af8d10b383ab0780ec043f0785 (patch)
tree4ec08b459891bde261e36eef785e92eb71bac44c /console-tools/chvt.c
parentde4c5d3d8c77f0c1f68b72fff3d7e3be0dc2dec2 (diff)
downloadbusybox-6ee023cf629c83af8d10b383ab0780ec043f0785.tar.gz
*: compile fixes for 64-bit build
Diffstat (limited to 'console-tools/chvt.c')
-rw-r--r--console-tools/chvt.c7
1 files changed, 4 insertions, 3 deletions
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;
}