Skip to content
Commit 78682c28 authored by Matt Evans's avatar Matt Evans Committed by Will Deacon
Browse files

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: default avatarDavid Evensky <evensky@dancer.ca.sandia.gov>
Signed-off-by: default avatarMatt Evans <matt@ozlabs.org>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent 17edd536
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment