From 5d51f552d8ccaaf9b99bf97c947d79c92359e398 Mon Sep 17 00:00:00 2001 From: millert Date: Tue, 9 Jan 2007 10:15:15 +0000 Subject: [PATCH] Use sa_len for size of struct sockaddr if it exists, not just for FreeBSD. Also append p0 to PKGNAME. OK Arnaud Bergeron. --- audio/mt-daapd/Makefile | 3 ++- audio/mt-daapd/patches/patch-src_mDNSUNP_c | 28 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 audio/mt-daapd/patches/patch-src_mDNSUNP_c diff --git a/audio/mt-daapd/Makefile b/audio/mt-daapd/Makefile index add719bb91e..5e5c258f0d7 100644 --- a/audio/mt-daapd/Makefile +++ b/audio/mt-daapd/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.4 2006/08/01 12:13:28 espie Exp $ +# $OpenBSD: Makefile,v 1.5 2007/01/09 10:15:15 millert Exp $ COMMENT= "multi-threaded DAAP server" DISTNAME= mt-daapd-0.2.4 +PKGNAME= ${DISTNAME}p0 CATEGORIES= audio net HOMEPAGE= http://www.mt-daapd.org/ diff --git a/audio/mt-daapd/patches/patch-src_mDNSUNP_c b/audio/mt-daapd/patches/patch-src_mDNSUNP_c new file mode 100644 index 00000000000..6abdcff845e --- /dev/null +++ b/audio/mt-daapd/patches/patch-src_mDNSUNP_c @@ -0,0 +1,28 @@ +$OpenBSD: patch-src_mDNSUNP_c,v 1.1 2007/01/09 10:15:15 millert Exp $ +--- src/mDNSUNP.c.orig Sun Jan 7 18:10:01 2007 ++++ src/mDNSUNP.c Sun Jan 7 18:12:28 2007 +@@ -159,22 +159,8 @@ + /* include get_ifi_info2 */ + for (ptr = buf; ptr < buf + ifc.ifc_len; ) { + ifr = (struct ifreq *) ptr; +- +- len = GET_SA_LEN(ifr->ifr_addr); +- +- /* This is completely whacked, and I really need to +- * find out why this is the case, but I need to +- * release a 0.2.2, and as the next stable won't +- * have the apple mDNS included, I guess it's a +- * small price to pay. +- */ +-#ifdef FREEBSD +- ptr += sizeof(ifr->ifr_name) + len; /* for next one in buffer */ +- // ptr += sizeof(*ifr); +-#else +- +- ptr += sizeof(struct ifreq); /* for next one in buffer */ +-#endif ++ len = GET_SA_LEN(ifr->ifr_addr); ++ ptr += sizeof(ifr->ifr_name) + len; /* for next one in buffer */ + + // fprintf(stderr, "intf %d name=%s AF=%d\n", index, ifr->ifr_name, ifr->ifr_addr.sa_family); +