From 4a8fdd6aa1bff7e2d5f452e3465d242eeb7981b1 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sun, 15 Aug 2010 13:08:45 +0000 Subject: Support for GNU/kFreeBSD kFreeBSD is GNU (with glibc) on to of a FreeBSD kernel. See http://glibc-bsd.alioth.debian.org/porting/PORTING This patch gets Asterisk close to building on Debian kFreeBSD i386, mainly by adding an extra test for __GLIBC__ in one or two (or more) places. OSARCH is set to 'kfreebsd-gnu' DAHDI support (and support for chan_vpb) was not tested. Review: https://reviewboard.asterisk.org/r/858/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282397 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/acl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main/acl.c') diff --git a/main/acl.c b/main/acl.c index 4ab102736..278647be8 100644 --- a/main/acl.c +++ b/main/acl.c @@ -123,7 +123,7 @@ static int get_local_address(struct ast_sockaddr *ourip) char *buf = NULL; int bufsz, x; #endif /* SOLARIS */ -#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) +#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__GLIBC__) struct ifaddrs *ifap, *ifaphead; int rtnerr; const struct sockaddr_in *sin; @@ -132,7 +132,7 @@ static int get_local_address(struct ast_sockaddr *ourip) int best_score = -100; memset(&best_addr, 0, sizeof(best_addr)); -#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) +#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__GLIBC__) rtnerr = getifaddrs(&ifaphead); if (rtnerr) { perror(NULL); @@ -143,7 +143,7 @@ static int get_local_address(struct ast_sockaddr *ourip) s = socket(AF_INET, SOCK_STREAM, 0); if (s > 0) { -#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) +#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__GLIBC__) for (ifap = ifaphead; ifap; ifap = ifap->ifa_next) { if (ifap->ifa_addr && ifap->ifa_addr->sa_family == AF_INET) { -- cgit v1.2.3