]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
xen: arm: Use __typeof__ rather than typeof dev-arm
authorJulien Grall <julien.grall@citrix.com>
Sun, 4 Oct 2015 19:33:04 +0000 (20:33 +0100)
committerJulien Grall <julien.grall@citrix.com>
Mon, 5 Oct 2015 17:56:33 +0000 (18:56 +0100)
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]

sys/xen/interface/arch-arm.h

index d474d4b6a40e991cd553b990174c517b2ac5bc39..227ad9d82a6b9b9aeb76d95940186f91063904a9 100644 (file)
 #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 )