Use __typeof__ which works with any GNU C profile, not like typeof
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 5 Oct 2009 14:41:21 +0000 (17:41 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 5 Oct 2009 14:41:21 +0000 (17:41 +0300)
include/vlc_common.h

index b771f99..e500cda 100644 (file)
@@ -524,7 +524,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 /* VLC_OBJECT: attempt at doing a clever cast */
 #ifdef __GNUC__
 # define VLC_OBJECT( x ) \
-    (((vlc_object_t *)(x))+0*(((typeof(x))0)->be_sure_to_add_VLC_COMMON_MEMBERS_to_struct))
+    (((vlc_object_t *)(x))+0*(((__typeof__(x))0)->be_sure_to_add_VLC_COMMON_MEMBERS_to_struct))
 #else
 # define VLC_OBJECT( x ) ((vlc_object_t *)(x))
 #endif