Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZM compile error with gcc 6.1 #1464

Closed
gj12 opened this issue May 7, 2016 · 0 comments · Fixed by #1491
Closed

ZM compile error with gcc 6.1 #1464

gj12 opened this issue May 7, 2016 · 0 comments · Fixed by #1491

Comments

@gj12
Copy link

gj12 commented May 7, 2016

[  1%] Building CXX object src/CMakeFiles/zm.dir/zm_rtp_ctrl.cpp.o
In file included from /root/ZM/ZM2/src/zm_rtp_ctrl.cpp:24:0:
/root/ZM/ZM2/src/zm_rtp_ctrl.h:128:23: error: flexible array member 'RtpCtrlThread::RtcpPacket::<anonymous union>::Bye::srcN' in an otherwise empty 'struct RtpCtrlThread::RtcpPacket::<anonymous union>::Bye'
         uint32_t srcN[];   // list of sources
                       ^
/root/ZM/ZM2/src/zm_rtp_ctrl.h:126:14: note: in the definition of 'struct RtpCtrlThread::RtcpPacket::<anonymous union>::Bye'
       struct Bye
              ^~~
src/CMakeFiles/zm.dir/build.make:710: recipe for target 'src/CMakeFiles/zm.dir/zm_rtp_ctrl.cpp.o' failed
make[2]: *** [src/CMakeFiles/zm.dir/zm_rtp_ctrl.cpp.o] Error 1
CMakeFiles/Makefile2:291: recipe for target 'src/CMakeFiles/zm.dir/all' failed
make[1]: *** [src/CMakeFiles/zm.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

This fixes the problem for me:

diff --git a/src/zm_rtp_ctrl.h b/src/zm_rtp_ctrl.h
index 2526f22..439f444 100644
--- a/src/zm_rtp_ctrl.h
+++ b/src/zm_rtp_ctrl.h
@@ -123,7 +123,7 @@ private:
       } sdes;

       // BYE
-      struct Bye
+      struct
       {
         uint32_t srcN[];   // list of sources
         // can't express trailing text for reason (what does this mean? it's not even english!)
This was referenced May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant