From: Tycho Andersen Date: Tue, 15 Mar 2016 18:01:36 +0000 (-0600) Subject: build: fix build on android (and ppc) X-Git-Tag: lxc-2.0.0.rc11~7^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F895%2Fhead;p=thirdparty%2Flxc.git build: fix build on android (and ppc) The problem here is that dev_t on most platforms is `long unsigned`, but on android (and ppc?) it's `long long unsigned`. Let's just upcast to `long long unsigned` and use that format string to keep the compilers happy. Safety first! Signed-off-by: Tycho Andersen --- diff --git a/src/lxc/criu.c b/src/lxc/criu.c index c83845e7a..a745806a5 100644 --- a/src/lxc/criu.c +++ b/src/lxc/criu.c @@ -732,7 +732,9 @@ static int save_tty_major_minor(char *directory, struct lxc_container *c, char * return -1; } - ret = snprintf(tty_id, len, "tty[%lx:%lx]", sb.st_rdev, sb.st_dev); + ret = snprintf(tty_id, len, "tty[%llx:%llx]", + (long long unsigned) sb.st_rdev, + (long long unsigned) sb.st_dev); if (ret < 0 || ret >= sizeof(path)) { ERROR("snprintf'd too many characters: %d", ret); return -1;