Index: asterisk-trunk/channels/sip/reqresp_parser.c =================================================================== --- asterisk-trunk/channels/sip/reqresp_parser.c (revision 279144) +++ asterisk-trunk/channels/sip/reqresp_parser.c (working copy) @@ -27,7 +27,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "include/sip_utils.h" #include "include/reqresp_parser.h" +#ifdef HAVE_XLOCALE_H locale_t c_locale; +#endif /*! \brief * parses a URI in its components.*/ int parse_uri_full(char *uri, const char *scheme, char **user, char **pass, @@ -2006,7 +2008,11 @@ static int sip_uri_domain_cmp(const char *host1, c * i.e. ASCII. */ if (!addr1_parsed) { +#ifdef HAVE_XLOCALE_H return strcasecmp_l(host1, host2, c_locale); +#else + return strcasecmp(host1, host2); +#endif } /* Both contain IP addresses */ @@ -2264,17 +2270,21 @@ void sip_request_parser_unregister_tests(void) int sip_reqresp_parser_init(void) { +#ifdef HAVE_XLOCALE_H c_locale = newlocale(LC_CTYPE_MASK, "C", NULL); if (!c_locale) { return -1; } +#endif return 0; } void sip_reqresp_parser_exit(void) { +#ifdef HAVE_XLOCALE_H if (c_locale) { freelocale(c_locale); c_locale = NULL; } +#endif } Index: asterisk-trunk/configure.ac =================================================================== --- asterisk-trunk/configure.ac (revision 279144) +++ asterisk-trunk/configure.ac (working copy) @@ -402,6 +402,9 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/event.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h]) +# some embedded systems omit internationalization (locale) support +AC_CHECK_HEADERS([xlocale.h]) + AC_CHECK_HEADERS([winsock.h winsock2.h]) AC_CHECK_HEADER([sys/poll.h],