Re: another kvm-70 compile bug with rhel/centos 5.2

Avi Kivity
2008-06-29T15:47:23Z

[-- Attachment #1: Type: text/plain, Size: 317 bytes --]

Farkas Levente wrote:
> hi,
> i'm just try to recompile kvm-70 with the latest centos-5.2 (aka
> rhel-5.2) kernel, but i've got a new compile error:

> error: redefinition of typedef 'bool'

Please try the attached patch, and let me know if it helps.

--
error compiling committee.c: too many arguments to function

[-- Attachment #2: rhel-5.2.patch --]
[-- Type: text/plain, Size: 497 bytes --]

diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h
index c28d759..1ad515f 100644
--- a/kernel/external-module-compat.h
+++ b/kernel/external-module-compat.h
@@ -349,10 +349,14 @@ uint64_t div64_u64(uint64_t dividend, uint64_t divisor);

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)

+#if !defined(RHEL_RELEASE_VERSION) || (RHEL_RELEASE_VERSION < RHEL_RELEASE_CODE(5,2))
+
typedef _Bool bool;

#endif

+#endif
+
/*
* PF_VCPU is a Linux 2.6.24 addition
*/