From a448fd0315e466c6e3b1e3339caec3c9a468c98b Mon Sep 17 00:00:00 2001 From: swills Date: Fri, 13 Feb 2015 19:52:53 +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 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@378942 35697150-7ecd-e111-bb59-0022644237b5 --- www/node-devel/Makefile | 1 + www/node-devel/files/patch-lib_dns.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 www/node-devel/files/patch-lib_dns.js diff --git a/www/node-devel/Makefile b/www/node-devel/Makefile index 5db937f868159..9064afa94ff29 100644 --- a/www/node-devel/Makefile +++ b/www/node-devel/Makefile @@ -2,6 +2,7 @@ PORTNAME= node PORTVERSION= 0.11.16 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://nodejs.org/dist/v${PORTVERSION}/ PKGNAMESUFFIX= -devel diff --git a/www/node-devel/files/patch-lib_dns.js b/www/node-devel/files/patch-lib_dns.js new file mode 100644 index 0000000000000..48e287a90551c --- /dev/null +++ b/www/node-devel/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; + }