]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
__builtin_offsetof() needs gcc >= 4
[vlc] / 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), \