1
From 7449acb4de84f766c27454baee499087d84384f0 Mon Sep 17 00:00:00 2001
2
From: Joachim Schiele <js@lastlog.de>
3
Date: Thu, 4 Jul 2013 14:13:02 +0000
4
Subject: [PATCH] fix for cyclic inclusion issue of stun.h in stunrequest.h
6
Content-Type: text/plain; charset=UTF-8
7
Content-Transfer-Encoding: 8bit
9
when compiling kopete/protocols/jabber/googletalk/libjingle/talk/session/phone/channelmanager.cc
10
it would produce this error:
12
kopete/protocols/jabber/googletalk/libjingle/talk/p2p/base/stunrequest.h:91:9: error: ‘StunMessageType’ does not name a type
15
this is cased by a cyclic use of stun.h, stunrequest.h and channelmanager.cc with the outcome,
16
that kdenetwork couldn't be compiled since kopete fails to build.
19
move the StunMessageType enum into its own #ifndef
21
.../googletalk/libjingle/talk/p2p/base/stun.h | 33 +++++++++++++---------
22
1 file changed, 20 insertions(+), 13 deletions(-)
24
diff --git a/protocols/jabber/googletalk/libjingle/talk/p2p/base/stun.h b/protocols/jabber/googletalk/libjingle/talk/p2p/base/stun.h
25
index 349d7bc..1ae64ed 100644
26
--- a/protocols/jabber/googletalk/libjingle/talk/p2p/base/stun.h
27
+++ b/protocols/jabber/googletalk/libjingle/talk/p2p/base/stun.h
29
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
-#ifndef TALK_P2P_BASE_STUN_H_
33
-#define TALK_P2P_BASE_STUN_H_
35
-// This file contains classes for dealing with the STUN and TURN protocols.
36
-// Both protocols use the same wire format.
41
-#include "talk/base/basictypes.h"
42
-#include "talk/base/bytebuffer.h"
43
-#include "talk/base/socketaddress.h"
46
+#ifndef STUN__HH__IN__STUNREQUEST__HH__CYCLIC_PROBLEM_FIX
47
+#define STUN__HH__IN__STUNREQUEST__HH__CYCLIC_PROBLEM_FIX
49
// These are the types of STUN & TURN messages as of last check.
50
enum StunMessageType {
51
@@ -57,6 +46,24 @@ enum StunMessageType {
52
STUN_DATA_INDICATION = 0x0115
55
+#endif // STUN__HH__IN__STUNREQUEST__HH__CYCLIC_PROBLEM_FIX
58
+#ifndef TALK_P2P_BASE_STUN_H_
59
+#define TALK_P2P_BASE_STUN_H_
61
+// This file contains classes for dealing with the STUN and TURN protocols.
62
+// Both protocols use the same wire format.
67
+#include "talk/base/basictypes.h"
68
+#include "talk/base/bytebuffer.h"
69
+#include "talk/base/socketaddress.h"
73
// These are the types of attributes defined in STUN & TURN. Next to each is
74
// the name of the class (T is StunTAttribute) that implements that type.