From 2b554b0f464cb91b3635a90699aaac2ad4acc32d Mon Sep 17 00:00:00 2001 From: swills Date: Fri, 13 Feb 2015 17:59:04 +0000 Subject: [PATCH] www/node: fix error getaddrinfo EAI_BADFLAGS PR: 197539 Reported by: Valery Komarov Submitted by: Daniel Lin (maintainer) Obtained from: https://github.com/joyent/node/issues/9204 --- www/node/Makefile | 1 + www/node/files/patch-lib_dns.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 www/node/files/patch-lib_dns.js diff --git a/www/node/Makefile b/www/node/Makefile index 99f840ffa10cd..c23ef2e3cb722 100644 --- a/www/node/Makefile +++ b/www/node/Makefile @@ -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} diff --git a/www/node/files/patch-lib_dns.js b/www/node/files/patch-lib_dns.js new file mode 100644 index 0000000000000..48e287a90551c --- /dev/null +++ b/www/node/files/patch-lib_dns.js @@ -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; + }