Asterisk 18.9 does not compile on Debian 13

Hi,

I get the following error compiling asterisk-certified-18.9-cert4 on debian 13:

[CC] utils.c → utils.o
utils.c:97:12: error: static declaration of ‘gethostbyname_r’ follows non-static declaration
97 | static int gethostbyname_r (const char *name, struct hostent *ret, char *buf,
| ^~~~~~~~~~~~~~~
In file included from /usr/src/asterisk-certified-18.9-cert4/include/asterisk/network.h:46,
from utils.c:43:
/usr/include/netdb.h:177:12: note: previous declaration of ‘gethostbyname_r’ with type ‘int(const char * restrict, struct hostent * restrict, char * restrict, size_t, struct hostent ** restrict, int * restrict)’ {aka ‘int(const char * restrict, struct hostent * restrict, char * restrict, long unsigned int, struct hostent ** restrict, int * restrict)’}
177 | extern int gethostbyname_r (const char *__restrict __name,
| ^~~~~~~~~~~~~~~
make[1]: *** [/usr/src/asterisk-certified-18.9-cert4/Makefile.rules:165: utils.o] Error 1
make: *** [Makefile:388: main] Error 2

Never had trouble compiling the same asterisk version on debian 12. Any idea on how to fix it?

Thanks

The compiler is likely more picky, so probably a code change required - may have been fixed in future changes/releases that could be backported.

Please retry on the latest community supported version. Certified versions are only intended for people with paid support contracts and only in the configurations for which support is provided. I would assume that compiling on an unapproved OS would void the certification, as would compiling with any change to the build settings (e.g. I don’t think that version is certified for use with chan_sip, so enabling chan_sip would void the certification).

This afternoon I installed Debian 13 on one of my test servers. Asterisk-23.0.0-rc2 and Used phreaknet to install DAHDI 3.4.0. I think that worked, but I did see a couple of Red messages that flashed by on the screen. The DAHDI utilities seem to work.

The only problem seems to be Sangoma wanpipe. It would not install due to Kernel level problems. Debian 12 is 6.1.0 and 13 is 6.12.48. So my T1 circuits are down.

So if you have Sangoma hardware cards stay on Debian 12 until Sangoma updates wanpipe.

Thanks. I think you are right. I tried installing asterisk 20 with no problem, so I’ ll stick with it.

Thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.