]> git.sesse.net Git - vlc/commitdiff
__builtin_offsetof() needs gcc >= 4
authorGildas Bazin <gbazin@videolan.org>
Tue, 9 Feb 2010 18:16:55 +0000 (18:16 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 9 Feb 2010 18:18:14 +0000 (18:18 +0000)
include/vlc_common.h

index 40a0764f7552af6a2c477eb202c5a99019120295..cd2dd01b771b35b635e8b57997a900d49d3aeb70 100644 (file)
@@ -548,7 +548,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 /**@}*/                                                                     \
 
 /* VLC_OBJECT: attempt at doing a clever cast */
-#ifdef __GNUC__
+#if defined( __GNUC__ ) && __GNUC__ > 3
 # ifndef __cplusplus
 #  define VLC_OBJECT( x ) \
     __builtin_choose_expr(__builtin_offsetof(__typeof__(*x), psz_object_type), \