summaryrefslogtreecommitdiff
path: root/www/node/files/patch-lib_dns.js
blob: 48e287a90551c5fd96e102db138cedb1dd0b8eb5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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;
   }