Index: Makefile =================================================================== --- Makefile (revision 476869) +++ Makefile (working copy) @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= mDNSResponder -PORTVERSION= 878.1.1 -PORTREVISION= 1 +PORTVERSION= 878.30.4 CATEGORIES= dns net MASTER_SITES= http://opensource.apple.com/tarballs/mDNSResponder/ PKGNAMESUFFIX= _nss @@ -21,9 +20,7 @@ .include -.if ${ARCH:C/^(...).*/\1/} == "arm" LD=${CC} -.endif post-extract: @${CP} ${FILESDIR}/nss_mdns_freebsd.c ${WRKSRC}/mDNSPosix @@ -32,7 +29,7 @@ (cd ${WRKSRC}/mDNSPosix && ${CC} ${CFLAGS} -c -std=c99 -Wall -fPIC \ -I. -I${PREFIX}/include -DPREFIX=\"${PREFIX}\" \ nss_mdns.c nss_mdns_freebsd.c) - (cd ${WRKSRC}/mDNSPosix && ${LD} -shared nss_mdns.o nss_mdns_freebsd.o \ + (cd ${WRKSRC}/mDNSPosix && ${LD} -shared -Wl,-soname=nss_mdns.so.1 nss_mdns.o nss_mdns_freebsd.o \ -o nss_mdns.so.1 -L${PREFIX}/lib -R${PREFIX}/lib -ldns_sd) post-build: @@ -41,7 +38,7 @@ do-install: ${INSTALL_LIB} ${WRKSRC}/mDNSPosix/nss_mdns.so.1 \ ${STAGEDIR}${PREFIX}/lib - ${LN} -sf ${PREFIX}/lib/nss_mdns.so.1 \ + ${LN} -sf nss_mdns.so.1 \ ${STAGEDIR}${PREFIX}/lib/nss_mdns.so ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/mDNSPosix/nss_mdns.conf \ Index: distinfo =================================================================== --- distinfo (revision 476869) +++ distinfo (working copy) @@ -1,3 +1,3 @@ -TIMESTAMP = 1511011856 -SHA256 (mDNSResponder-878.1.1.tar.gz) = 655e83a78796cb7e944a05111d980617afa290e238e7ce26647105f3ab4461ee -SIZE (mDNSResponder-878.1.1.tar.gz) = 2462985 +TIMESTAMP = 1518122832 +SHA256 (mDNSResponder-878.30.4.tar.gz) = 83ae1245ce8612438dd358a83c8c4a4f1348725d0dbf0703cf520882589229af +SIZE (mDNSResponder-878.30.4.tar.gz) = 2490030 Index: files/nss_mdns_freebsd.c =================================================================== --- files/nss_mdns_freebsd.c (revision 476869) +++ files/nss_mdns_freebsd.c (working copy) @@ -121,9 +121,9 @@ for (res = res0; res; res = res->ai_next) res->ai_flags = pai->ai_flags; - (*aip)->ai_next = res0; while ((*aip)->ai_next) *aip = (*aip)->ai_next; + (*aip)->ai_next = res0; } } @@ -140,10 +140,16 @@ memset(&sentinel, 0, sizeof(sentinel)); cur = &sentinel; - if ((ai->ai_family == AF_UNSPEC) || (ai->ai_family == AF_INET6)) + if (ai->ai_family == AF_INET) { + aiforaf(name, AF_INET, ai, &cur); + } + else if (ai->ai_family == AF_INET6) { aiforaf(name, AF_INET6, ai, &cur); - if ((ai->ai_family == AF_UNSPEC) || (ai->ai_family == AF_INET)) + } + else if (ai->ai_family == AF_UNSPEC) { + aiforaf(name, AF_INET6, ai, &cur); aiforaf(name, AF_INET, ai, &cur); + } if (!sentinel.ai_next) { h_errno = HOST_NOT_FOUND;