From 339de1a81a724dc07b8c6c4dfbdc5a5840c15d1f Mon Sep 17 00:00:00 2001 From: Andre Nathan Date: Thu, 9 Jan 2014 08:33:25 -0200 Subject: [PATCH] Support large bdevs on 32-bit This change follows lxc@d659597e03725411c366c42dc02c64c0c35a167a. --- ext/lxc/lxc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/lxc/lxc.c b/ext/lxc/lxc.c index e847af3..6c6cfc0 100644 --- a/ext/lxc/lxc.c +++ b/ext/lxc/lxc.c @@ -3,6 +3,7 @@ #include /* for CLONE_* constants */ #include #include +#include #include #define SYMBOL(s) ID2SYM(rb_intern(s)) @@ -712,7 +713,7 @@ static VALUE container_clone(int argc, VALUE *argv, VALUE self) { int flags; - unsigned long new_size; + uint64_t new_size; char *name, *config_path, *bdev_type, *bdev_data; char **hook_args; struct lxc_container *container, *new_container; @@ -755,7 +756,7 @@ container_clone(int argc, VALUE *argv, VALUE self) rb_new_size = rb_hash_aref(rb_opts, SYMBOL("new_size")); if (!NIL_P(rb_bdev_data)) - new_size = NUM2INT(rb_new_size); + new_size = NUM2ULL(rb_new_size); rb_hook_args = rb_hash_aref(rb_opts, SYMBOL("hook_args")); if (!NIL_P(rb_hook_args))