Summary:ASTERISK-24458: chan_phone fails to build on big endian systems
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2014-10-27 06:54:33Date Closed:2014-10-29 09:45:45
Versions:13.0.0-beta3 Frequency of
Description:See build log in https://buildd.debian.org/status/fetch.php?pkg=asterisk&arch=powerpc&ver=1%3A13.0.0~dfsg-1&stamp=1414362167

Short version:
   if (frame->subclass.format.id == AST_FORMAT_SLINEAR)
chan_phone.c:830:37: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [chan_phone.o] Error 1

Same happens on powerpc, sparc and s390x.

Code in question:

                       if (frame->subclass.format.id == AST_FORMAT_SLINEAR)
                               swap = 1; /* Swap big-endian samples to little-endian as we copy */
Comments:By: Tzafrir Cohen (tzafrir) 2014-10-27 06:58:57.906-0500

From IRC:

coreyfarrell: tzafrir: should be a matter of replacing the line with: if (ast_format_cmp(frame->subclass.format, ast_format_slin) == AST_FORMAT_CMP_EQUAL)

By: Corey Farrell (coreyfarrell) 2014-10-27 15:50:40.458-0500

I grant permission for anyone with the ability to test on big endian to take ownership of the change I suggested and get it implemented.

By: Matt Jordan (mjordan) 2014-10-28 11:48:43.908-0500

Tzafrir - can you test if Corey's suggestion works? If so, I'd be happy to push it on in.