From: Julien Grall Subject: [PATCH for-4.6] xen/public: arm: Use __typeof__ rather than typeof Date: Sun, 4 Oct 2015 20:24:02 +0100 Message-ID: <1443986642-24392-1-git-send-email-julien.grall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZiovB-00039f-80 for xen-devel@lists.xenproject.org; Sun, 04 Oct 2015 19:26:09 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Keir Fraser , ian.campbell@citrix.com, Tim Deegan , Ian Jackson , Julien Grall , Jan Beulich , Wei.Liu2@citrix.com List-Id: xen-devel@lists.xenproject.org The keyword typeof is not portable: /usr/src/freebsd/sys/xen/hypervisor.h:93:2: error: implicit declaration of function 'typeof' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Signed-off-by: Julien Grall --- Cc: Ian Campbell Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan This patch is a candidate to backport in Xen 4.6, 4.5 and 4.4. It would be nice to get this small fix before Xen 4.6 is released. Without it, it's not possible to build ARM software including Xen headers with -std=c99. --- xen/include/public/arch-arm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h index faad68d..ba3cd42 100644 --- a/xen/include/public/arch-arm.h +++ b/xen/include/public/arch-arm.h @@ -191,7 +191,7 @@ #define XEN_GUEST_HANDLE_PARAM(name) __guest_handle_ ## name #define set_xen_guest_handle_raw(hnd, val) \ do { \ - typeof(&(hnd)) _sxghr_tmp = &(hnd); \ + __typeof__(&(hnd)) _sxghr_tmp = &(hnd); \ _sxghr_tmp->q = 0; \ _sxghr_tmp->p = val; \ } while ( 0 ) -- 2.1.4