diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-02-01 15:55:58 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-02-01 15:55:58 +0000 |
commit | fc2b1594a907d8a4c0f109790f1a1054358d6732 (patch) | |
tree | c5616d54fa81931b7e31faca208ec9e1a35abf9a /main/acl.c | |
parent | 6b5164ab9d18d325656c8bb5d23eed400c7bf468 (diff) |
Compatibility fix for OpenWRT (reported by Brian Capouch via the mailing list)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101772 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/acl.c')
-rw-r--r-- | main/acl.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/acl.c b/main/acl.c index f48459e57..e36008a04 100644 --- a/main/acl.c +++ b/main/acl.c @@ -51,7 +51,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 @@ -88,6 +88,12 @@ struct my_ifreq { struct sockaddr_in ifru_addr; }; +#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; @@ -241,6 +247,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) { |