summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Donald2026-02-24 16:54:54 +0000
committerJiri Slachta2026-03-06 18:49:57 +0000
commite2c5adab62e25eddeff3e52d4678163f6c9a6c3a (patch)
tree71e68b857e3d8bafd5b7403bf0e941259a4c2668
parenta001cfba33556273cd599868a34b9447aeda0539 (diff)
downloadtelephony-master.tar.gz
asteris-chan-sccp: fix compile for sccpHEADmaster
Provide forward declarations which are absent during compile to resolve compile error. Compile tested only in the hope it's useful. Signed-off-by: Paul Donald <newtwen+github@gmail.com>
-rw-r--r--net/asterisk-chan-sccp/patches/03-compile-fix.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/net/asterisk-chan-sccp/patches/03-compile-fix.patch b/net/asterisk-chan-sccp/patches/03-compile-fix.patch
new file mode 100644
index 0000000..e94d241
--- /dev/null
+++ b/net/asterisk-chan-sccp/patches/03-compile-fix.patch
@@ -0,0 +1,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