]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Fix build of util.c on 32bit machines
authorMatt Evans <matt@ozlabs.org>
Wed, 14 Dec 2011 01:10:03 +0000 (12:10 +1100)
committerPekka Enberg <penberg@kernel.org>
Wed, 14 Dec 2011 06:30:14 +0000 (08:30 +0200)
commita9fcc1f4b3f4f021c86e9e2f4cdd4f6f5ffa77f4
tree89c54fc23c3262fe4d634ebb60febe5a5756c855
parentf9f09f7c33bfa2f9c2115105d501f566912a37e1
kvm tools: Fix build of util.c on 32bit machines

commit 378ee7e6dd301347c6bf2c740cb1fb40174bcb8b broke the -Werror build
on 32bit targets due to some variable typing in struct statfs:

On 14/12/11 11:03, David Evensky wrote:
> On an x86 32bit system (and using the 32bit CodeSourcery toolchain on
> a x86_64 system) I get:
>
> evensky@machine:~/.../linux-kvm/tools/kvm$ make
>   CC       util/util.o
> util/util.c: In function 'mmap_hugetlbfs':
> util/util.c:93:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
> util/util.c:99:7: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Werror=format]
> cc1: all warnings being treated as errors
>
> make: *** [util/util.o] Error 1

Fixes the build.

Reported-by: David Evensky <evensky@dancer.ca.sandia.gov>
Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/util/util.c