summaryrefslogtreecommitdiffstats
path: root/net/asterisk-chan-sccp/patches/03-compile-fix.patch
blob: e94d241579c8089ecc3cfb1fb4a2f505f6c0325b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- a/src/pbx_impl/ast116/ast116.c
+++ b/src/pbx_impl/ast116/ast116.c
@@ -61,6 +61,21 @@ __BEGIN_C_EXTERN__
 #include <asterisk/format_cap.h>		// for AST_FORMAT_CAP_NAMES_LEN
 #include <asterisk/say.h>                                        // PARKING
 
+/* Channel API prototypes are required for wrapper functions such as
+ * ast_channel_macroexten/macrocontext.  Older headers may have included
+ * this transitively, but newer releases do not. */
+#include <asterisk/channel.h>
+
+/* Some Asterisk versions (particularly older development headers used by
+ * embedded builds) omit explicit prototypes for macroexten/macrocontext
+ * accessor functions.  The PBX wrapper relies on these functions, so
+ * provide forward declarations in case they are missing.  Duplicate
+ * declarations are harmless. */
+const char *ast_channel_macroexten(const struct ast_channel *chan);
+void ast_channel_macroexten_set(struct ast_channel *chan, const char *value);
+const char *ast_channel_macrocontext(const struct ast_channel *chan);
+void ast_channel_macrocontext_set(struct ast_channel *chan, const char *value);
+
 #define new avoid_cxx_new_keyword
 #include <asterisk/rtp_engine.h>
 #undef new