Patchwork [13/21] KVM: Fix compilation on non-x86

login
register
mail settings
Submitter Alexander Graf
Date Feb. 2, 2012, 1:49 a.m.
Message ID <1328147384-10387-14-git-send-email-agraf@suse.de>
Download mbox | patch
Permalink /patch/139036/
State New
Headers show

Comments

Alexander Graf - Feb. 2, 2012, 1:49 a.m.
Commit 84b058d broke compilation for KVM on non-x86 targets, which
don't have KVM_CAP_IRQ_ROUTING defined.

Fix by not using the unavailable constant when it's not around.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 kvm-all.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Patch

diff --git a/kvm-all.c b/kvm-all.c
index 7d4e544..0b87658 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1306,7 +1306,11 @@  int kvm_has_many_ioeventfds(void)
 
 int kvm_has_gsi_routing(void)
 {
+#ifdef KVM_CAP_IRQ_ROUTING
     return kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING);
+#else
+    return false;
+#endif
 }
 
 int kvm_allows_irq0_override(void)