summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorabhijeetbhagat <abhijeet.bhagat@gmx.com>2021-06-06 12:09:09 +0530
committerabhijeetbhagat <abhijeet.bhagat@gmx.com>2021-07-21 21:53:55 +0530
commitba47c6ccc312f27f207bce007569588698bdc17f (patch)
tree96e17d918e5c4708b121dee8b64fc9e30177c435
parentca1e7d45d39db4dbcc99c6fe28df452bbf47ae14 (diff)
downloadlibnice-ba47c6ccc312f27f207bce007569588698bdc17f.tar.gz
stun: Make the headers usable from C++ code
Add the relevant ifdef extern C bits
-rw-r--r--stun/stunagent.h8
-rw-r--r--stun/stunmessage.h7
2 files changed, 15 insertions, 0 deletions
diff --git a/stun/stunagent.h b/stun/stunagent.h
index fba972e..0d279e5 100644
--- a/stun/stunagent.h
+++ b/stun/stunagent.h
@@ -72,6 +72,10 @@ typedef struct stun_agent_t StunAgent;
#include "stunmessage.h"
#include "debug.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* StunCompatibility:
* @STUN_COMPATIBILITY_RFC3489: Use the STUN specifications compatible with
@@ -526,4 +530,8 @@ bool stun_agent_forget_transaction (StunAgent *agent, StunTransactionId id);
*/
void stun_agent_set_software (StunAgent *agent, const char *software);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _STUN_AGENT_H */
diff --git a/stun/stunmessage.h b/stun/stunmessage.h
index cfa5ca2..239cf90 100644
--- a/stun/stunmessage.h
+++ b/stun/stunmessage.h
@@ -74,6 +74,10 @@
typedef struct _StunMessage StunMessage;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* StunClass:
* @STUN_REQUEST: A STUN Request message
@@ -1016,5 +1020,8 @@ bool stun_optional (uint16_t t);
*/
const char *stun_strerror (StunError code);
+#ifdef __cplusplus
+}
+#endif
#endif /* _STUN_MESSAGE_H */