Skip to content

Commit

Permalink
www/node: fix error getaddrinfo EAI_BADFLAGS
Browse files Browse the repository at this point in the history
PR:		197539
Reported by:	Valery Komarov <[email protected]>
Submitted by:	Daniel Lin <[email protected]> (maintainer)
Obtained from:	nodejs/node-v0.x-archive#9204
  • Loading branch information
swills committed Feb 13, 2015
1 parent c2c1a9f commit 2b554b0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions www/node/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
14 changes: 14 additions & 0 deletions www/node/files/patch-lib_dns.js
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 2b554b0

Please sign in to comment.