From: Julien Grall Date: Sun, 4 Oct 2015 19:33:04 +0000 (+0100) Subject: xen: arm: Use __typeof__ rather than typeof X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=refs%2Fheads%2Fdev-arm;p=people%2Fjulieng%2Ffreebsd.git xen: arm: Use __typeof__ rather than typeof 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] --- diff --git a/sys/xen/interface/arch-arm.h b/sys/xen/interface/arch-arm.h index d474d4b6a40e..227ad9d82a6b 100644 --- a/sys/xen/interface/arch-arm.h +++ b/sys/xen/interface/arch-arm.h @@ -197,7 +197,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 )