[vlc-devel] [PATCH 1/2] vlc_common: GCC enumerator attributes are only available since gcc 6

Steve Lhomme robux4 at videolabs.io
Mon Aug 7 13:22:31 CEST 2017


---
 include/vlc_common.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index d9cee53b37..78c5db1304 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -83,6 +83,11 @@
 /* Function attributes for compiler warnings */
 #ifdef __GNUC__
 # define VLC_DEPRECATED __attribute__((deprecated))
+# if VLC_GCC_VERSION(6,0)
+#  define VLC_DEPRECATED_ENUM __attribute__((deprecated))
+# else
+#  define VLC_DEPRECATED_ENUM
+# endif
 
 # if defined( _WIN32 )
 #  define VLC_FORMAT(x,y) __attribute__ ((format(gnu_printf,x,y)))
@@ -95,6 +100,7 @@
 
 #else
 # define VLC_DEPRECATED
+# define VLC_DEPRECATED_ENUM
 # define VLC_FORMAT(x,y)
 # define VLC_FORMAT_ARG(x)
 # define VLC_MALLOC
-- 
2.12.1



More information about the vlc-devel mailing list