[asterisk-commits] tilghman: trunk r101773 - in /trunk: ./ include/asterisk/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 1 10:01:22 CST 2008


Author: tilghman
Date: Fri Feb  1 10:01:22 2008
New Revision: 101773

URL: http://svn.digium.com/view/asterisk?view=rev&rev=101773
Log:
Merged revisions 101772 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101772 | tilghman | 2008-02-01 09:55:58 -0600 (Fri, 01 Feb 2008) | 2 lines

Compatibility fix for OpenWRT (reported by Brian Capouch via the mailing list)

........

Modified:
    trunk/   (props changed)
    trunk/configure
    trunk/configure.ac
    trunk/include/asterisk/autoconfig.h.in
    trunk/main/acl.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?view=diff&rev=101773&r1=101772&r2=101773
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Feb  1 10:01:22 2008
@@ -571,6 +571,8 @@
 AST_EXT_LIB_CHECK([STRTOD], [c], [strtod], [stdlib.h])
 AST_EXT_LIB_CHECK([FLOOR], [m], [floor])
 AST_EXT_LIB_CHECK([CEIL], [m], [ceil])
+
+AST_EXT_LIB_CHECK([GETIFADDRS], [c], [getifaddrs], [ifaddrs.h])
 
 GSM_INTERNAL="yes"
 AC_SUBST(GSM_INTERNAL)

Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=101773&r1=101772&r2=101773
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Fri Feb  1 10:01:22 2008
@@ -296,6 +296,12 @@
 
 /* Define to 1 if you have the `gethostname' function. */
 #undef HAVE_GETHOSTNAME
+
+/* Define this to indicate the ${GETIFADDRS_DESCRIP} library */
+#undef HAVE_GETIFADDRS
+
+/* Define to indicate the ${GETIFADDRS_DESCRIP} library version */
+#undef HAVE_GETIFADDRS_VERSION
 
 /* Define to 1 if you have the `getloadavg' function. */
 #undef HAVE_GETLOADAVG

Modified: trunk/main/acl.c
URL: http://svn.digium.com/view/asterisk/trunk/main/acl.c?view=diff&rev=101773&r1=101772&r2=101773
==============================================================================
--- trunk/main/acl.c (original)
+++ trunk/main/acl.c Fri Feb  1 10:01:22 2008
@@ -37,7 +37,7 @@
 #if defined(SOLARIS)
 #include <sys/sockio.h>
 #include <net/if.h>
-#else
+#elif defined(HAVE_GETIFADDRS)
 #include <ifaddrs.h>
 #endif
 
@@ -47,6 +47,12 @@
 #include "asterisk/lock.h"
 #include "asterisk/srv.h"
 
+#if (!defined(SOLARIS) && !defined(HAVE_GETIFADDRS))
+static int get_local_address(struct in_addr *ourip)
+{
+	return -1;
+}
+#else
 static void score_address(const struct sockaddr_in *sin, struct in_addr *best_addr, int *best_score)
 {
 	const char *address;
@@ -200,6 +206,8 @@
 		memcpy(ourip, &best_addr, sizeof(*ourip));
 	return res;
 }
+#endif /* HAVE_GETIFADDRS */
+
 /* Free HA structure */
 void ast_free_ha(struct ast_ha *ha)
 {




More information about the asterisk-commits mailing list