aboutsummaryrefslogtreecommitdiffstats
path: root/main/acl.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-01 16:01:22 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-01 16:01:22 +0000
commitb2033ac5cf99119725b9d7443d7223fe9c6f81af (patch)
tree53eda180291e68dab6fcc1d5b270af894f805fd7 /main/acl.c
parent627780bc287b3dd92c4a343e10957cbf0a62210d (diff)
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) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@101773 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/acl.c')
-rw-r--r--main/acl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/main/acl.c b/main/acl.c
index 4a26ec3ce..22248648f 100644
--- a/main/acl.c
+++ b/main/acl.c
@@ -37,7 +37,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#if defined(SOLARIS)
#include <sys/sockio.h>
#include <net/if.h>
-#else
+#elif defined(HAVE_GETIFADDRS)
#include <ifaddrs.h>
#endif
@@ -47,6 +47,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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 @@ static int get_local_address(struct in_addr *ourip)
memcpy(ourip, &best_addr, sizeof(*ourip));
return res;
}
+#endif /* HAVE_GETIFADDRS */
+
/* Free HA structure */
void ast_free_ha(struct ast_ha *ha)
{