summaryrefslogtreecommitdiffstats
path: root/patches/chromium/third_party/libjingle/source/talk/0001-Do-not-forward-declare-WebRtcVoiceChannelInfo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/chromium/third_party/libjingle/source/talk/0001-Do-not-forward-declare-WebRtcVoiceChannelInfo.patch')
-rw-r--r--patches/chromium/third_party/libjingle/source/talk/0001-Do-not-forward-declare-WebRtcVoiceChannelInfo.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/patches/chromium/third_party/libjingle/source/talk/0001-Do-not-forward-declare-WebRtcVoiceChannelInfo.patch b/patches/chromium/third_party/libjingle/source/talk/0001-Do-not-forward-declare-WebRtcVoiceChannelInfo.patch
new file mode 100644
index 000000000..5af44662d
--- /dev/null
+++ b/patches/chromium/third_party/libjingle/source/talk/0001-Do-not-forward-declare-WebRtcVoiceChannelInfo.patch
@@ -0,0 +1,63 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Zeno Albisser <zeno.albisser@digia.com>
+Date: Wed, 16 Oct 2013 10:17:11 +0200
+Subject: Do not forward declare WebRtcVoiceChannelInfo.
+
+Clang / libc++ does not support incomplete types in
+templates. See:
+http://clang.llvm.org/compatibility.html#undep_incomplete
+
+This fixes the fixes the "error: field has incomplete type" compiler error.
+---
+ media/webrtc/webrtcvoiceengine.cc | 13 -------------
+ media/webrtc/webrtcvoiceengine.h | 13 ++++++++++++-
+ 2 files changed, 12 insertions(+), 14 deletions(-)
+
+diff --git a/media/webrtc/webrtcvoiceengine.cc b/media/webrtc/webrtcvoiceengine.cc
+index 2a6ccd7..8686038 100644
+--- a/media/webrtc/webrtcvoiceengine.cc
++++ b/media/webrtc/webrtcvoiceengine.cc
+@@ -1475,19 +1475,6 @@ void WebRtcVoiceEngine::StopAecDump() {
+ }
+ }
+
+-// This struct relies on the generated copy constructor and assignment operator
+-// since it is used in an stl::map.
+-struct WebRtcVoiceMediaChannel::WebRtcVoiceChannelInfo {
+- WebRtcVoiceChannelInfo() : channel(-1), renderer(NULL) {}
+- WebRtcVoiceChannelInfo(int ch, AudioRenderer* r)
+- : channel(ch),
+- renderer(r) {}
+- ~WebRtcVoiceChannelInfo() {}
+-
+- int channel;
+- AudioRenderer* renderer;
+-};
+-
+ // WebRtcVoiceMediaChannel
+ WebRtcVoiceMediaChannel::WebRtcVoiceMediaChannel(WebRtcVoiceEngine *engine)
+ : WebRtcMediaChannel<VoiceMediaChannel, WebRtcVoiceEngine>(
+diff --git a/media/webrtc/webrtcvoiceengine.h b/media/webrtc/webrtcvoiceengine.h
+index 6cb0b30..62d3bc1 100644
+--- a/media/webrtc/webrtcvoiceengine.h
++++ b/media/webrtc/webrtcvoiceengine.h
+@@ -374,7 +374,18 @@ class WebRtcVoiceMediaChannel
+ static Error WebRtcErrorToChannelError(int err_code);
+
+ private:
+- struct WebRtcVoiceChannelInfo;
++ // This struct relies on the generated copy constructor and assignment operator
++ // since it is used in an stl::map.
++ struct WebRtcVoiceChannelInfo {
++ WebRtcVoiceChannelInfo() : channel(-1), renderer(NULL) {}
++ WebRtcVoiceChannelInfo(int ch, AudioRenderer* r)
++ : channel(ch),
++ renderer(r) {}
++ ~WebRtcVoiceChannelInfo() {}
++
++ int channel;
++ AudioRenderer* renderer;
++ };
+ typedef std::map<uint32, WebRtcVoiceChannelInfo> ChannelMap;
+
+ void SetNack(int channel, bool nack_enabled);