diff --git a/deps/v8/src/base/platform/platform-freebsd.cc b/deps/v8/src/base/platform/platform-freebsd.cc index 507b946f69f57f..58316f8bc1a9ab 100644 --- a/deps/v8/src/base/platform/platform-freebsd.cc +++ b/deps/v8/src/base/platform/platform-freebsd.cc @@ -141,7 +141,7 @@ std::vector OS::GetSharedLibraryAddresses() { if (bytes_read < 8) break; unsigned end = StringToLong(addr_buffer); char buffer[MAP_LENGTH]; - int bytes_read = -1; + bytes_read = -1; do { bytes_read++; if (bytes_read >= MAP_LENGTH - 1) diff --git a/deps/v8/src/base/platform/platform-posix.cc b/deps/v8/src/base/platform/platform-posix.cc index c2fa26a9ea9364..64aed2b8d1f2d0 100644 --- a/deps/v8/src/base/platform/platform-posix.cc +++ b/deps/v8/src/base/platform/platform-posix.cc @@ -261,7 +261,7 @@ int OS::GetCurrentThreadId() { #elif V8_OS_ANDROID return static_cast(gettid()); #else - return static_cast(pthread_self()); + return static_cast(reinterpret_cast(pthread_self())); #endif } diff --git a/deps/v8/src/debug.cc b/deps/v8/src/debug.cc index 93ef1cfc097393..cdcb0a759f0e43 100644 --- a/deps/v8/src/debug.cc +++ b/deps/v8/src/debug.cc @@ -573,7 +573,7 @@ void Debug::ThreadInit() { thread_local_.step_out_fp_ = 0; // TODO(isolates): frames_are_dropped_? base::NoBarrier_Store(&thread_local_.current_debug_scope_, - static_cast(NULL)); + static_cast(0)); thread_local_.restarter_frame_function_pointer_ = NULL; } diff --git a/deps/v8/src/preparser.h b/deps/v8/src/preparser.h index 18004a5096d4c2..ad27744e9d5730 100644 --- a/deps/v8/src/preparser.h +++ b/deps/v8/src/preparser.h @@ -467,7 +467,7 @@ class ParserBase : public Traits { void ReportMessageAt(Scanner::Location location, const char* message, bool is_reference_error = false) { Traits::ReportMessageAt(location, message, - reinterpret_cast(NULL), + reinterpret_cast(0), is_reference_error); } diff --git a/deps/v8/src/unique.h b/deps/v8/src/unique.h index 9232f859708366..321eb3683dbeda 100644 --- a/deps/v8/src/unique.h +++ b/deps/v8/src/unique.h @@ -117,7 +117,7 @@ class Unique { // TODO(titzer): this is a hack to migrate to Unique incrementally. static Unique CreateUninitialized(Handle handle) { - return Unique(reinterpret_cast
(NULL), handle); + return Unique(NULL, handle); } static Unique CreateImmovable(Handle handle) { diff --git a/lib/dns.js b/lib/dns.js index 0a6e84a435da02..09aea0028f97c9 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -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 kernel does not support it + if (process.platform === 'freebsd' && family !== 6) + hints &= ~exports.V4MAPPED; } else { family = options >>> 0; } diff --git a/test/parallel/test-child-process-spawnsync-timeout.js b/test/parallel/test-child-process-spawnsync-timeout.js index 0e95eb3c4adec8..f5b5987e4d1eaf 100644 --- a/test/parallel/test-child-process-spawnsync-timeout.js +++ b/test/parallel/test-child-process-spawnsync-timeout.js @@ -4,7 +4,7 @@ var assert = require('assert'); var spawnSync = require('child_process').spawnSync; var TIMER = 200; -var SLEEP = 1000; +var SLEEP = 5000; switch (process.argv[2]) { case 'child': diff --git a/test/parallel/test-fs-readfile-error.js b/test/parallel/test-fs-readfile-error.js index 8f298eafd9ca19..b8cf3e01757092 100644 --- a/test/parallel/test-fs-readfile-error.js +++ b/test/parallel/test-fs-readfile-error.js @@ -3,6 +3,13 @@ var assert = require('assert'); var exec = require('child_process').exec; var path = require('path'); +// `fs.readFile('/')` does not fail on FreeBSD, because you can open and read +// the directory there. +if (process.platform === 'freebsd') { + console.error('Skipping test, platform not supported.'); + process.exit(); +} + var callbacks = 0; function test(env, cb) { diff --git a/test/sequential/test-setproctitle.js b/test/sequential/test-setproctitle.js index 961b20f3470af2..b7e6dd8b552a5d 100644 --- a/test/sequential/test-setproctitle.js +++ b/test/sequential/test-setproctitle.js @@ -24,7 +24,7 @@ exec('ps -p ' + process.pid + ' -o args=', function(error, stdout, stderr) { assert.equal(stderr, ''); // freebsd always add ' (procname)' to the process title - if (process.platform === 'freebsd') title += ' (node)'; + if (process.platform === 'freebsd') title += ' (iojs)'; // omitting trailing whitespace and \n assert.equal(stdout.replace(/\s+$/, ''), title);