From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZh9P-00053t-PO for qemu-devel@nongnu.org; Tue, 07 May 2013 08:37:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZh9J-000449-1J for qemu-devel@nongnu.org; Tue, 07 May 2013 08:37:47 -0400 Received: from mail-ve0-x229.google.com ([2607:f8b0:400c:c01::229]:43118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZh9I-00043r-UI for qemu-devel@nongnu.org; Tue, 07 May 2013 08:37:40 -0400 Received: by mail-ve0-f169.google.com with SMTP id jz10so434151veb.14 for ; Tue, 07 May 2013 05:37:40 -0700 (PDT) From: Andre Przywara Date: Tue, 7 May 2013 14:36:59 +0200 Message-Id: <1367930219-14361-1-git-send-email-andre.przywara@linaro.org> Subject: [Qemu-devel] [PATCH] fdt: update embedded header file from upstream to fix compilation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: jdl@jdl.com, kim.phillips@freescale.com, qemu-devel@nongnu.org, hollisb@us.ibm.com, Andre Przywara Upstream dtc.git introduced a change in libfdt_env.h, which breaks compilation with QEMU's version of it: CC arm-softmmu/device_tree.o In file included from /usr/include/libfdt.h:55:0, from /src/qemu.git/device_tree.c:28: /usr/include/fdt.h:7:2: error: unknown type name 'fdt32_t' ... The culprit is: commit feafcd972cb744750a65728440c99526e6199a6d Author: Kim Phillips Date: Wed Nov 28 17:33:01 2012 -0600 dtc/libfdt: introduce fdt types for annotation by endian checkers ... Pull the new definitions into QEMU's version of the file. This change also works with older installed versions of dtc. The upstream version got a "GPL or BSD" dual license header meanwhile. I retained the original GPL license header from QEMU, only added the original copyrights. Signed-off-by: Andre Przywara --- include/libfdt_env.h | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/include/libfdt_env.h b/include/libfdt_env.h index 3667d4c..aad54bb 100644 --- a/include/libfdt_env.h +++ b/include/libfdt_env.h @@ -1,4 +1,12 @@ +#ifndef _LIBFDT_ENV_H +#define _LIBFDT_ENV_H /* + * libfdt - Flat Device Tree manipulation + * Copyright (C) 2006 David Gibson, IBM Corporation. + * Copyright 2012 Kim Phillips, Freescale Semiconductor. + * Adaptation to QEMU: Copyright IBM Corp. 2008 + * by Hollis Blanchard + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. @@ -11,16 +19,23 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, see . * - * Copyright IBM Corp. 2008 - * Authors: Hollis Blanchard * */ -#ifndef _LIBFDT_ENV_H -#define _LIBFDT_ENV_H - #include "qemu/bswap.h" +#ifdef __CHECKER__ +#define __force __attribute__((force)) +#define __bitwise __attribute__((bitwise)) +#else +#define __force +#define __bitwise +#endif + +typedef uint16_t __bitwise fdt16_t; +typedef uint32_t __bitwise fdt32_t; +typedef uint64_t __bitwise fdt64_t; + #ifdef HOST_WORDS_BIGENDIAN #define fdt32_to_cpu(x) (x) #define cpu_to_fdt32(x) (x) -- 1.7.12.1