diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-04-18 14:22:14 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-04-18 14:22:14 +0000 |
commit | 8c0d577eb5e5255333e43bd4b89dc3a266f03685 (patch) | |
tree | cdfbdc6804385fdf8a63cc9fbc8a2d90b519faff /target-i386 | |
parent | 6ad6135dcaec584958179bb57a954d3f8d890919 (diff) |
kvm: avoid collision with dprintf macro in stdio.h, spotted by clang
Fixes clang errors:
CC i386-softmmu/kvm.o
/src/qemu/target-i386/kvm.c:40:9: error: 'dprintf' macro redefined
In file included from /src/qemu/target-i386/kvm.c:21:
In file included from /src/qemu/qemu-common.h:27:
In file included from /usr/include/stdio.h:910:
/usr/include/bits/stdio2.h:189:12: note: previous definition is here
CC i386-softmmu/kvm-all.o
/src/qemu/kvm-all.c:39:9: error: 'dprintf' macro redefined
In file included from /src/qemu/kvm-all.c:23:
In file included from /src/qemu/qemu-common.h:27:
In file included from /usr/include/stdio.h:910:
/usr/include/bits/stdio2.h:189:12: note: previous definition is here
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/kvm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index f77e4880b3..5513472e8e 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -34,10 +34,10 @@ //#define DEBUG_KVM #ifdef DEBUG_KVM -#define dprintf(fmt, ...) \ +#define DPRINTF(fmt, ...) \ do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0) #else -#define dprintf(fmt, ...) \ +#define DPRINTF(fmt, ...) \ do { } while (0) #endif @@ -957,7 +957,7 @@ int kvm_arch_pre_run(CPUState *env, struct kvm_run *run) struct kvm_interrupt intr; intr.irq = irq; /* FIXME: errors */ - dprintf("injected interrupt %d\n", irq); + DPRINTF("injected interrupt %d\n", irq); kvm_vcpu_ioctl(env, KVM_INTERRUPT, &intr); } } @@ -971,7 +971,7 @@ int kvm_arch_pre_run(CPUState *env, struct kvm_run *run) else run->request_interrupt_window = 0; - dprintf("setting tpr\n"); + DPRINTF("setting tpr\n"); run->cr8 = cpu_get_apic_tpr(env); return 0; @@ -1009,7 +1009,7 @@ int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run) switch (run->exit_reason) { case KVM_EXIT_HLT: - dprintf("handle_hlt\n"); + DPRINTF("handle_hlt\n"); ret = kvm_handle_halt(env); break; } |