pkgsrc/comms/asterisk18/patches/patch-be
jnemeth 1499a825e8 PR/44257 - Francois Tigeot -- build fixes for DragonFly BSD
Don't bother bumping the version since it didn't build on DFBSD
before there is no binary package that could have changed, and this
doesn't change the binary packages on other systems.
2010-12-22 04:28:52 +00:00

40 lines
1.9 KiB
Text

$NetBSD: patch-be,v 1.1 2010/12/22 04:28:53 jnemeth Exp $
--- main/acl.c.orig 2010-10-14 15:15:12.000000000 +0000
+++ main/acl.c
@@ -123,7 +123,7 @@ static int get_local_address(struct ast_
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(__DragonFly__)
struct ifaddrs *ifap, *ifaphead;
int rtnerr;
const struct sockaddr_in *sin;
@@ -132,7 +132,7 @@ static int get_local_address(struct ast_
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(__DragonFly__)
rtnerr = getifaddrs(&ifaphead);
if (rtnerr) {
perror(NULL);
@@ -143,7 +143,7 @@ static int get_local_address(struct ast_
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(__DragonFly__)
for (ifap = ifaphead; ifap; ifap = ifap->ifa_next) {
if (ifap->ifa_addr && ifap->ifa_addr->sa_family == AF_INET) {
@@ -202,7 +202,7 @@ static int get_local_address(struct ast_
close(s);
}
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__DragonFly__)
freeifaddrs(ifaphead);
#endif /* BSD_OR_LINUX */