[vlc-commits] mkv: fix build failure when compiled with llvm

Filip Roséen git at videolan.org
Wed Mar 9 18:30:15 CET 2016


vlc | branch: master | Filip Roséen <filip at videolabs.io> | Wed Mar  9 18:19:15 2016 +0100| [8d119e05672a419a83cb73940473c65abb82852a] | committer: Jean-Baptiste Kempf

mkv: fix build failure when compiled with llvm

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).

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8d119e05672a419a83cb73940473c65abb82852a
---

 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;                        \



More information about the vlc-commits mailing list