Fix build failure caused by KVM-specific code in arches not supporting KVM: LINK alpha-softmmu/qemu-system-alpha i8259.o: In function `kvm_i8259_set_irq': /tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/hw/i8259.c:689: undefined reference to `apic_set_irq_delivered' diff --git a/hw/i8259.c b/hw/i8259.c index 21a4efc..bb3bb18 100644 --- a/hw/i8259.c +++ b/hw/i8259.c @@ -21,6 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ +#include "apic.h" #include "hw.h" #include "pc.h" #include "isa.h" @@ -591,11 +592,13 @@ static int kvm_kernel_pic_load_from_user(PICCommonState *s) static void kvm_i8259_set_irq(void *opaque, int irq, int level) { +#ifdef CONFIG_KVM int pic_ret; if (kvm_set_irq(irq, level, &pic_ret)) { apic_report_irq_delivered(pic_ret); return; } +#endif } device_init(pic_register)