From: Gleb Natapov <gleb@xxxxxxxxxx> Fixes builds with older kernel headers. Signed-off-by: Gleb Natapov <gleb@xxxxxxxxxx> Signed-off-by: Avi Kivity <avi@xxxxxxxxxx> Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx> diff --git a/kvm/libkvm/libkvm.c b/kvm/libkvm/libkvm.c index 0ac1c28..7c65f31 100644 --- a/kvm/libkvm/libkvm.c +++ b/kvm/libkvm/libkvm.c @@ -667,9 +667,14 @@ int kvm_set_irq_level(kvm_context_t kvm, int irq, int level, int *status) if (r == -1) perror("kvm_set_irq_level"); - if (status) + if (status) { +#ifdef KVM_CAP_IRQ_INJECT_STATUS *status = (kvm->irqchip_inject_ioctl == KVM_IRQ_LINE) ? 1 : event.status; +#else + *status = 1; +#endif + } return 1; } -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html