Received: from eggs.gnu.org ([208.118.235.92]:34772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvrlO-000570-Sj for qemu-devel@nongnu.org; Thu, 17 Jan 2013 10:52:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvrlM-0005z8-7g for qemu-devel@nongnu.org; Thu, 17 Jan 2013 10:52:22 -0500 From: Peter Maydell Date: Thu, 17 Jan 2013 15:52:08 +0000 Message-Id: <1358437928-2420-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] qemu-pixman.h: Avoid mutual inclusion loop with console.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Paolo Bonzini , patches@linaro.org Remove an unnecessary mutual inclusion loop between qemu-pixman.h and console.h, since the former was only including the latter for 'PixelFormat*', which can be provided by typedefs.h. This requires a minor adjustment to qemu-pixman.c, which was relying on the implicit inclusion of console.h for the actual struct PixelFormat definition, and on implicitly dragging in a header defining NULL. Signed-off-by: Peter Maydell --- I noticed this because I had an out of tree file which included ui/console.h before qemu-common.h and it didn't compile. But mutual include loops are a bad idea anyway IMHO. include/ui/qemu-pixman.h | 2 +- ui/qemu-pixman.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h index 016fd87..b032f52 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.h @@ -15,7 +15,7 @@ #pragma GCC diagnostic error "-Wredundant-decls" #endif -#include "console.h" +#include "qemu/typedefs.h" /* * pixman image formats are defined to be native endian, diff --git a/ui/qemu-pixman.c b/ui/qemu-pixman.c index 609335a..6dcbe90 100644 --- a/ui/qemu-pixman.c +++ b/ui/qemu-pixman.c @@ -3,7 +3,8 @@ * See the COPYING file in the top-level directory. */ -#include "ui/qemu-pixman.h" +#include "qemu-common.h" +#include "ui/console.h" int qemu_pixman_get_type(int rshift, int gshift, int bshift) { -- 1.7.9.5