View | Details | Raw Unified | Return to bug 193229 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-7 / +16 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	mDNSResponder_nss
3
PORTNAME=	mDNSResponder_nss
4
PORTVERSION=	544
4
PORTVERSION=	544
5
PORTREVISION=	1
5
CATEGORIES=	dns net
6
CATEGORIES=	dns net
6
MASTER_SITES=	http://opensource.apple.com/tarballs/mDNSResponder/
7
MASTER_SITES=	http://opensource.apple.com/tarballs/mDNSResponder/
7
DISTNAME=	${PORTNAME:S/_nss//}-${PORTVERSION}
8
DISTNAME=	${PORTNAME:S/_nss//}-${PORTVERSION}
Lines 10-20 Link Here
10
COMMENT=	Apple mDNS responder - FreeBSD nsswitch module
11
COMMENT=	Apple mDNS responder - FreeBSD nsswitch module
11
12
12
LICENSE=	APACHE20 BSD3CLAUSE
13
LICENSE=	APACHE20 BSD3CLAUSE
13
LICENSE_COMB=	dual
14
LICENSE_COMB=   dual
14
15
15
LIB_DEPENDS=	libdns_sd.so:${PORTSDIR}/net/mDNSResponder
16
LIB_DEPENDS=	libdns_sd.so:${PORTSDIR}/net/mDNSResponder
16
17
17
CONFLICTS_INSTALL=	nss_mdns-[0-9]*
18
CONFLICTS_INSTALL=nss_mdns-[0-9]*
18
19
19
WRKSRC=		${WRKDIR}/${PORTNAME:S/_nss//}-${PORTVERSION}
20
WRKSRC=		${WRKDIR}/${PORTNAME:S/_nss//}-${PORTVERSION}
20
21
Lines 28-41 Link Here
28
	(cd ${WRKSRC}/mDNSPosix && ${LD} -shared nss_mdns.o nss_mdns_freebsd.o \
29
	(cd ${WRKSRC}/mDNSPosix && ${LD} -shared nss_mdns.o nss_mdns_freebsd.o \
29
		-o nss_mdns.so.1 -L${PREFIX}/lib -R${PREFIX}/lib -ldns_sd)
30
		-o nss_mdns.so.1 -L${PREFIX}/lib -R${PREFIX}/lib -ldns_sd)
30
31
32
post-build:
33
	${STRIP_CMD} ${WRKSRC}/mDNSPosix/nss_mdns.so.1
34
31
do-install:
35
do-install:
32
	${INSTALL_LIB} ${WRKSRC}/mDNSPosix/nss_mdns.so.1 ${STAGEDIR}${PREFIX}/lib
36
	${INSTALL_LIB} ${WRKSRC}/mDNSPosix/nss_mdns.so.1 \
33
	${LN} -sf ${PREFIX}/lib/nss_mdns.so.1 ${STAGEDIR}${PREFIX}/lib/nss_mdns.so
37
		${STAGEDIR}${PREFIX}/lib
38
	${LN} -sf ${PREFIX}/lib/nss_mdns.so.1 \
39
		${STAGEDIR}${PREFIX}/lib/nss_mdns.so
34
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
40
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
35
	${INSTALL_DATA} ${WRKSRC}/mDNSPosix/nss_mdns.conf ${STAGEDIR}${EXAMPLESDIR}
41
	${INSTALL_DATA} ${WRKSRC}/mDNSPosix/nss_mdns.conf \
36
	${INSTALL_MAN} ${WRKSRC}/mDNSPosix/nss_mdns.conf.5 ${STAGEDIR}${MANPREFIX}/man/man5
42
		${STAGEDIR}${EXAMPLESDIR}
43
	${INSTALL_MAN} ${WRKSRC}/mDNSPosix/nss_mdns.conf.5 \
44
		${STAGEDIR}${MANPREFIX}/man/man5
37
45
38
post-install:
46
post-install:
39
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/nss_mdns.so.1
47
	${INSTALL_DATA} ${WRKSRC}/mDNSPosix/nss_mdns.conf \
48
		${STAGEDIR}${PREFIX}/etc/nss_mdns.conf.sample
40
49
41
.include <bsd.port.mk>
50
.include <bsd.port.mk>
(-)files/nss_mdns_freebsd.c (-10 / +9 lines)
Lines 76-89 Link Here
76
	int *errnop;
76
	int *errnop;
77
	int *h_errnop;
77
	int *h_errnop;
78
78
79
    addr = va_arg(ap, const void *);
79
	addr = va_arg(ap, const void *);
80
    addrlen = va_arg(ap, socklen_t);
80
	addrlen = va_arg(ap, socklen_t);
81
    af = va_arg(ap, int);
81
	af = va_arg(ap, int);
82
    hptr = va_arg(ap, struct hostent *);
82
	hptr = va_arg(ap, struct hostent *);
83
    buffer = va_arg(ap, char *);
83
	buffer = va_arg(ap, char *);
84
    buflen = va_arg(ap, size_t);
84
	buflen = va_arg(ap, size_t);
85
    errnop = va_arg(ap, int *);
85
	errnop = va_arg(ap, int *);
86
    h_errnop = va_arg(ap, int *);
86
	h_errnop = va_arg(ap, int *);
87
87
88
	s = _nss_mdns_gethostbyaddr_r(
88
	s = _nss_mdns_gethostbyaddr_r(
89
			addr, addrlen, af, hptr, buffer, buflen, errnop, h_errnop);
89
			addr, addrlen, af, hptr, buffer, buflen, errnop, h_errnop);
Lines 110-117 Link Here
110
110
111
	for (addrp = host.h_addr_list; *addrp; addrp++) {
111
	for (addrp = host.h_addr_list; *addrp; addrp++) {
112
		/* XXX this sucks, but get_ai is not public */
112
		/* XXX this sucks, but get_ai is not public */
113
		if (!inet_ntop(host.h_addrtype, *addrp,
113
		if (!inet_ntop(host.h_addrtype, *addrp, addrstr, sizeof(addrstr)))
114
			       addrstr, sizeof(addrstr)))
115
			continue;
114
			continue;
116
		hints = *pai;
115
		hints = *pai;
117
		hints.ai_flags = AI_NUMERICHOST;
116
		hints.ai_flags = AI_NUMERICHOST;

Return to bug 193229