traud / asterisk-opus

Asterisk 13 transcoding module: Opus
GNU General Public License v2.0
31 stars 21 forks source link

Patching newly released Asterisk 15 breaks compilation #11

Closed guss77 closed 7 years ago

guss77 commented 7 years ago

When applying enable_native_plc.patch , compilation of Asterisk 15 breaks with the following error:

   [CC] translate.c -> translate.o
translate.c: In function 'ast_translate':
translate.c:577:13: error: 'p' undeclared (first use in this function)
   for (tp = p; tp; tp = tp->next) {
             ^
translate.c:577:13: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [translate.o] Error 1
make: *** [main] Error 2

It looks like the rewrite of the internal p variable in ast_translate() to step was not a good idea, because future versions for Asterisk may refer to this p in new code.

guss77 commented 7 years ago

Now I get a "malformed patch" error when I apply the patch:

+ patch -p1
patching file main/translate.c
Hunk #1 succeeded at 357 (offset -2 lines).
patch: **** malformed patch at line 56:     has_timing_info = ast_test_flag(f, AST_FRFLAG_HAS_TIMING_INFO);
guss77 commented 7 years ago

Thank you - that solved the problem. Now Asterisk 15 patches and compiles successfully!