Received: from eggs.gnu.org ([2001:4830:134:3::10]:52171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNKBW-0001qa-91 for qemu-devel@nongnu.org; Wed, 13 Jul 2016 09:26:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNKBV-0003AA-6h for qemu-devel@nongnu.org; Wed, 13 Jul 2016 09:26:42 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:35888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNKBV-0003A2-07 for qemu-devel@nongnu.org; Wed, 13 Jul 2016 09:26:41 -0400 Received: by mail-wm0-x241.google.com with SMTP id x83so5864857wma.3 for ; Wed, 13 Jul 2016 06:26:40 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 13 Jul 2016 15:26:24 +0200 Message-Id: <1468416392-120170-7-git-send-email-pbonzini@redhat.com> In-Reply-To: <1468416392-120170-1-git-send-email-pbonzini@redhat.com> References: <1468416392-120170-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 06/14] disas: avoid including everything in headers compiled from C++ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Markus Armbruster 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: Sean Bruno Tested-by: Sean Bruno Cc: Peter Maydell Cc: Markus Armbruster Signed-off-by: Paolo Bonzini --- include/disas/bfd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/disas/bfd.h b/include/disas/bfd.h index a112e9c..a87b8a1 100644 --- a/include/disas/bfd.h +++ b/include/disas/bfd.h @@ -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; -- 1.8.3.1