1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

www/node: fix error getaddrinfo EAI_BADFLAGS

PR:		197539
Reported by:	Valery Komarov <komarov@valerka.net>
Submitted by:	Daniel Lin <linpct@gmail.com> (maintainer)
Obtained from:	https://github.com/joyent/node/issues/9204
This commit is contained in:
Steve Wills 2015-02-13 17:59:04 +00:00
parent 0d8ece171e
commit eb82f765c0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=378937
2 changed files with 15 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= node
PORTVERSION= 0.12.0
PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://nodejs.org/dist/v${PORTVERSION}/
DISTNAME= ${PORTNAME}-v${PORTVERSION}

View File

@ -0,0 +1,14 @@
--- lib/dns.js.orig 2015-02-13 23:42:28.000000000 +0800
+++ lib/dns.js 2015-02-13 23:46:39.000000000 +0800
@@ -125,6 +125,11 @@
hints !== (exports.ADDRCONFIG | exports.V4MAPPED)) {
throw new TypeError('invalid argument: hints must use valid flags');
}
+ // FIXME(indutny): V4MAPPED on FreeBSD results in EAI_BADFLAGS, because
+ // the libc does not support it
+ if (process.platform === 'freebsd' && family !== 6) {
+ hints &= ~exports.V4MAPPED;
+ }
} else {
family = options >>> 0;
}