-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
www/node: fix error getaddrinfo EAI_BADFLAGS
PR: 197539 Reported by: Valery Komarov <[email protected]> Submitted by: Daniel Lin <[email protected]> (maintainer) Obtained from: nodejs/node-v0.x-archive#9204 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@378937 35697150-7ecd-e111-bb59-0022644237b5
- Loading branch information
swills
committed
Feb 13, 2015
1 parent
0f21fca
commit 6053abd
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |