Commit 1e13c01d authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

disas: avoid including everything in headers compiled from C++



disas/arm-a64.cc is careful to include only the bare minimum that
it needs---qemu/osdep.h and disas/bfd.h.  Unfortunately, disas/bfd.h
then includes qemu-common.h, which brings in qemu/option.h and from
there we get the kitchen sink.

This causes problems because for example QEMU's atomic macros
conflict with C++ atomic types.  But really all that bfd.h needs
is the fprintf_function typedef, so replace the inclusion of
qemu-common.h with qemu/fprintf-fn.h.

Reported-by: default avatarSean Bruno <sbruno@freebsd.org>
Tested-by: default avatarSean Bruno <sbruno@freebsd.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent a942d8fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
#ifndef DIS_ASM_H
#define DIS_ASM_H

#include "qemu-common.h"
#include "qemu/fprintf-fn.h"

typedef void *PTR;
typedef uint64_t bfd_vma;