mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
dns: remove AI_V4MAPPED hint flag on FreeBSD
FreeBSD does not support V4MAPPED. PR-URL: https://github.com/iojs/io.js/pull/332 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
b949437c00
commit
04bea9f9c2
@ -106,6 +106,11 @@ exports.lookup = function lookup(hostname, options, callback) {
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user