From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: another kvm-70 compile bug with rhel/centos 5.2 Date: Sun, 29 Jun 2008 20:50:58 +0300 Message-ID: <4867CB82.60507@qumranet.com> References: <4862AE06.6060206@lfarkas.org> <4867AE8A.4010600@qumranet.com> <4867C557.3040806@lfarkas.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090307060809010006070105" Cc: kvm@vger.kernel.org To: Farkas Levente Return-path: Received: from il.qumranet.com ([212.179.150.194]:15747 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754466AbYF2Ruj (ORCPT ); Sun, 29 Jun 2008 13:50:39 -0400 In-Reply-To: <4867C557.3040806@lfarkas.org> Sender: kvm-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------090307060809010006070105 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Farkas Levente wrote: > Avi Kivity wrote: >> 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. >> > > FYI: > /lib/modules/2.6.18-92.1.6.el5/build/include/linux/version.h: > ------------------------------- > #define LINUX_VERSION_CODE 132626 > #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) > #define RHEL_MAJOR 5 > #define RHEL_MINOR 2 > #define RHEL_RELEASE_CODE 1282 > #define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b)) > ------------------------------- > Ah, swapped _CODE and _VERSION. Updated patch attached. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. --------------090307060809010006070105 Content-Type: text/x-patch; name="rhel-5.2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rhel-5.2.patch" 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_CODE) || (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(5,2)) + typedef _Bool bool; #endif +#endif + /* * PF_VCPU is a Linux 2.6.24 addition */ --------------090307060809010006070105--