The following patch fixes building the kvm module for kernels older than
2.6.21 and which were missing an include to <asm/apicdef.h> in <asm/io_apic.h>
resulting in the following error :
    
  include/asm/io_apic.h:61: error: 'MAX_IO_APICS' undeclared here (not in a 
function)

Signed-off-by: Carlo Marcelo Arenas Belon <[EMAIL PROTECTED]>
---
 kernel/external-module-compat.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h
index 1dc5a96..510bca4 100644
--- a/kernel/external-module-compat.h
+++ b/kernel/external-module-compat.h
@@ -537,8 +537,12 @@ out:
 #define CONFIG_HAS_IOMEM 1
 #endif
 
-/* Some kernels don't make dest_* available with some configs. */
+/* io_apic.h was missing this include in old versions of the headers */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)
+#include <asm/apicdef.h>
+#endif
 
+/* Some kernels don't make dest_* available with some configs. */
 #include <asm/io_apic.h>
 
 #ifndef dest_Fixed
-- 
1.5.2.5


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to