[vlc-devel] [PATCH] vlc_common.h: Fix VLC_OBJECT when building with clang

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Sep 14 18:10:31 CEST 2016


---
 include/vlc_common.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index 5a6bf19..59988fa 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -476,7 +476,8 @@ struct vlc_common_members
 #if !defined(__cplusplus) && (__STDC_VERSION__ >= 201112L)
 # define VLC_OBJECT(x) \
     _Generic((x)->obj, \
-        struct vlc_common_members: (vlc_object_t *)(&(x)->obj) \
+        struct vlc_common_members: (vlc_object_t *)(&(x)->obj), \
+        const struct vlc_common_members: (const vlc_object_t *)(&(x)->obj) \
     )
 #elif VLC_GCC_VERSION(4,0)
 # ifndef __cplusplus
-- 
2.9.3



More information about the vlc-devel mailing list