From: Pekka Enberg Date: Sun, 23 Oct 2011 07:03:19 +0000 (+0300) Subject: kvm tools, bios: Don't include glibc headers X-Git-Tag: next-20111025~3^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a678aa7ae3c4fc76a10896ac913267f1ea6c9c1f;p=karo-tx-linux.git kvm tools, bios: Don't include glibc headers We should not include glibc headers from BIOS code which can't rely on glibc at runtime. This patch fixes the following build breakage on 64-bit: CC bios/e820.o In file included from /usr/include/features.h:387:0, from /usr/include/unistd.h:26, from include/kvm/util.h:12, from bios/e820.c:5: /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory compilation terminated. make: *** [bios/bios.bin.elf] Error 1 when built without the 'glibc-devel.i686' package on Fedora, for example. Cc: Asias He Cc: Ingo Molnar Cc: Sasha Levin Acked-by: Cyrill Gorcunov Signed-off-by: Pekka Enberg --- diff --git a/tools/kvm/README b/tools/kvm/README index 7cbf5306db02..c262995600d6 100644 --- a/tools/kvm/README +++ b/tools/kvm/README @@ -102,7 +102,7 @@ For rpm based systems: 32-bit: yum install glibc-devel 64-bit: -yum install glibc-devel glibc-devel.i686 glibc-static +yum install glibc-devel glibc-static On 64-bit Arch Linux make sure the multilib repository is enabled in your /etc/pacman.conf and run diff --git a/tools/kvm/bios/e820.c b/tools/kvm/bios/e820.c index 1eafb5b357e5..a9bca29bff73 100644 --- a/tools/kvm/bios/e820.c +++ b/tools/kvm/bios/e820.c @@ -2,7 +2,6 @@ #include "kvm/segment.h" #include "kvm/bios.h" -#include "kvm/util.h" #include #include diff --git a/tools/kvm/bios/int10.c b/tools/kvm/bios/int10.c index 6387ca8b15eb..32f7c923d459 100644 --- a/tools/kvm/bios/int10.c +++ b/tools/kvm/bios/int10.c @@ -1,12 +1,9 @@ #include "kvm/segment.h" #include "kvm/bios.h" -#include "kvm/util.h" #include "kvm/vesa.h" #include "bios/memcpy.h" -#include - #define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24)) /* VESA General Information table */