[vlc-devel] [PATCH] mkv: fix build failure when compiled with llvm
Filip Roséen
filip at videolabs.io
Wed Mar 9 18:19:15 CET 2016
LLVM treats a typedef with forward-declaration inside a local struct as
a forward-declaration for a nested type of that struct, effectively
erroring on the implementation of the dispatchers.
This patch fixes that issue by forcing the name to referr to a type in
the sourrounding scope (by introducing a proper forward-declaration).
---
modules/demux/mkv/dispatcher.hpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules/demux/mkv/dispatcher.hpp b/modules/demux/mkv/dispatcher.hpp
index 1422435..37a9447 100644
--- a/modules/demux/mkv/dispatcher.hpp
+++ b/modules/demux/mkv/dispatcher.hpp
@@ -90,6 +90,7 @@ namespace {
#define MKV_SWITCH_CREATE(DispatchType_, GroupName_, PayloadType_) \
typedef DispatcherTag<__LINE__> GroupName_ ## _tag_t; \
extern GroupName_##_tag_t GroupName_ ## _tag; \
+ struct GroupName_; \
struct GroupName_##_base : DispatchContainer<GroupName_##_tag_t, &GroupName_##_tag, DispatchType_> { \
typedef PayloadType_ payload_t; \
typedef DispatchType_ dispatch_t; \
--
2.7.2
More information about the vlc-devel
mailing list