summaryrefslogtreecommitdiff
path: root/databases/mongodb
diff options
context:
space:
mode:
authorryoon <ryoon>2016-02-12 03:37:24 +0000
committerryoon <ryoon>2016-02-12 03:37:24 +0000
commit79890a712b2f724bbb3a7846c2fe2a3669d189c9 (patch)
treeadefb244b4f3fcb68a1485f6b9972813e38aca94 /databases/mongodb
parent2e6a806c9881b69ff06c94d11129adf31e37637f (diff)
downloadpkgsrc-79890a712b2f724bbb3a7846c2fe2a3669d189c9.tar.gz
Update to 3.2.1
* Change JavaScript engine from V8 to SpiderMonkey. Changelog: 3.2.1 – Jan 12, 2016 Fixed error where during a regular shutdown of a replica set, secondaries may mark certain replicated but yet to be applied operations as successfully applied: SERVER-21868. Improve insert workload performance with WiredTiger on Windows: SERVER-20262. Fixed long-running transactions during chunk moves: SERVER-21366 All issues closed in 3.2.1 3.0.9 – Jan 26, 2016 Fixed issue where queries which specify sort and batch size can return results out of order if documents are concurrently updated. SERVER-19996 Fixed performance issue where large amounts of create and drop collections can cause listDatabases to be slow under WiredTiger. SERVER-20961 Modified the authentication failure message to include the client IP address. SERVER-22054 All issues closed in 3.0.9 3.0.8 – Dec 15, 2015 Fixed issue where findAndModify on mongos can upsert to the wrong shard. SERVER-20407. Fixed WiredTiger commit visibility issue which caused document not found. SERVER-21275. Fixed issue where the oplog can grow to 3x configured size. SERVER-21553 All issues closed in 3.0.8
Diffstat (limited to 'databases/mongodb')
-rw-r--r--databases/mongodb/Makefile30
-rw-r--r--databases/mongodb/distinfo38
-rw-r--r--databases/mongodb/patches/patch-SConstruct137
-rw-r--r--databases/mongodb/patches/patch-debian_mongod.conf6
-rw-r--r--databases/mongodb/patches/patch-src_mongo_db_repl_isself.c14
-rw-r--r--databases/mongodb/patches/patch-src_mongo_platform_random.cpp10
-rw-r--r--databases/mongodb/patches/patch-src_mongo_platform_stack__locator__dragonfly.cpp63
-rw-r--r--databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp63
-rw-r--r--databases/mongodb/patches/patch-src_mongo_shell_linenoise__utf8.h8
-rw-r--r--databases/mongodb/patches/patch-src_mongo_util_intrusive__counter.h8
-rw-r--r--databases/mongodb/patches/patch-src_mongo_util_processinfo__dragonfly.cpp195
-rw-r--r--databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp218
-rw-r--r--databases/mongodb/patches/patch-src_third__party_mozjs-38_platform_x86__64_netbsd_build_js-confdefs.h20
-rw-r--r--databases/mongodb/patches/patch-src_third__party_mozjs-38_platform_x86__64_netbsd_include_js-config.h13
-rw-r--r--databases/mongodb/patches/patch-src_third__party_s2_base_port.h10
-rw-r--r--databases/mongodb/patches/patch-src_third__party_v8-3.25_SConscript35
-rw-r--r--databases/mongodb/patches/patch-src_third__party_v8-3.25_src_platform-posix.cc29
-rw-r--r--databases/mongodb/patches/patch-src_third__party_v8-3.25_src_platform_semaphore.cc48
-rw-r--r--databases/mongodb/patches/patch-src_third__party_wiredtiger_SConscript31
-rw-r--r--databases/mongodb/patches/patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h159
-rw-r--r--databases/mongodb/patches/patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h9
21 files changed, 892 insertions, 252 deletions
diff --git a/databases/mongodb/Makefile b/databases/mongodb/Makefile
index 257631bba1e..1a94268e6e9 100644
--- a/databases/mongodb/Makefile
+++ b/databases/mongodb/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.9 2015/12/05 21:25:31 adam Exp $
+# $NetBSD: Makefile,v 1.10 2016/02/12 03:37:24 ryoon Exp $
-DISTNAME= mongodb-src-r3.0.7
+DISTNAME= mongodb-src-r3.2.1
PKGNAME= ${DISTNAME:S/src-r//:S/-rc/rc/}
CATEGORIES= databases
MASTER_SITES= http://fastdl.mongodb.org/src/
@@ -17,16 +17,12 @@ BUILD_DEPENDS+= scons-[0-9]*:../../devel/scons
SCONS_BIN= ${PREFIX}/bin/scons
SCONS_ARGS= ${_MAKE_JOBS}
-SCONS_ARGS+= --c++11=on
-SCONS_ARGS+= --cc=${WRAPPER_BINDIR}/${CC:Q}
-SCONS_ARGS+= --cxx=${WRAPPER_BINDIR}/${CXX:Q}
-SCONS_ARGS+= --use-system-boost=USE-SYSTEM-BOOST
-SCONS_ARGS+= --use-system-pcre=USE-SYSTEM-PCRE
-SCONS_ARGS+= --use-system-snappy=USE-SYSTEM-SNAPPY
-SCONS_ARGS+= --use-system-tcmalloc=USE-SYSTEM-TCMALLOC
-SCONS_ARGS+= --js-engine=v8-3.25
-# Avoid Argument list too long from mongod linking
-SCONS_ARGS+= --variant-dir=pkgsrc
+SCONS_ARGS+= --use-system-boost
+SCONS_ARGS+= --use-system-pcre
+SCONS_ARGS+= --use-system-snappy
+SCONS_ARGS+= --use-system-tcmalloc
+SCONS_ARGS+= --js-engine=mozjs
+SCONS_ARGS+= --release
PYTHON_VERSIONS_INCOMPATIBLE= 33 34 35 # not yet supported as of 3.0.4
@@ -34,12 +30,6 @@ PYTHON_VERSIONS_INCOMPATIBLE= 33 34 35 # not yet supported as of 3.0.4
GCC_REQD+= 4.8.2
-.if ${MACHINE_ARCH} == "x86_64"
-SCONS_ARGS+= --64
-.else
-SCONS_ARGS+= --32
-.endif
-
CPPFLAGS+= -fno-jump-tables
.include "options.mk"
@@ -101,6 +91,10 @@ CONF_FILES+= share/examples/mongodb/mongod.conf \
post-extract:
chmod -R g-w ${WRKSRC}
+ cp -r ${WRKSRC}/src/third_party/mozjs-38/platform/x86_64/freebsd \
+ ${WRKSRC}/src/third_party/mozjs-38/platform/x86_64/dragonfly
+ cp -r ${WRKSRC}/src/third_party/mozjs-38/platform/x86_64/openbsd \
+ ${WRKSRC}/src/third_party/mozjs-38/platform/x86_64/netbsd
do-build:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONS_BIN} ${SCONS_ARGS} core
diff --git a/databases/mongodb/distinfo b/databases/mongodb/distinfo
index 6f6905abcb1..d3035b0cefd 100644
--- a/databases/mongodb/distinfo
+++ b/databases/mongodb/distinfo
@@ -1,19 +1,23 @@
-$NetBSD: distinfo,v 1.10 2015/11/04 17:41:15 agc Exp $
+$NetBSD: distinfo,v 1.11 2016/02/12 03:37:24 ryoon Exp $
-SHA1 (mongodb-src-r3.0.7.tar.gz) = 0384231807936cd3b0e016a7fa2778114af62488
-RMD160 (mongodb-src-r3.0.7.tar.gz) = b578718798df8e7eb5a29a392aff33ff7429a373
-SHA512 (mongodb-src-r3.0.7.tar.gz) = 183691c5dc137ea4b86d53d24d2935fd66ed8de60fbf5eca0a0a39c159be1f29043cd655cde1a213a98a76b2b3e6369dbccf790b02a1cc4b622c067ad3c0c91b
-Size (mongodb-src-r3.0.7.tar.gz) = 26261343 bytes
-SHA1 (patch-SConstruct) = 71f06ac82474f81a6b1b6660cd9e23cd5a63d55f
-SHA1 (patch-debian_mongod.conf) = 499a664ad22ca7085b164ae0e897f4f11c5190b4
+SHA1 (mongodb-src-r3.2.1.tar.gz) = fedd44901f894c12965f0d4d74e857b7930b5b64
+RMD160 (mongodb-src-r3.2.1.tar.gz) = 785485818b520525862008085c7ab7b737a6c33c
+SHA512 (mongodb-src-r3.2.1.tar.gz) = 5ce0af3e70010e3602dd2f7c49c80feee1c89903a694db038543a7f399f4296f2c04bf3aee7089da0b24aa9239aa79823e6f5408bf0f3c6fade6166e94070309
+Size (mongodb-src-r3.2.1.tar.gz) = 26397562 bytes
+SHA1 (patch-SConstruct) = d872e234effef5275201b46d506bc45a7ad12862
+SHA1 (patch-debian_mongod.conf) = d4146b3d62b4472d55609c7f6aaa596f8f893d1f
SHA1 (patch-src_mongo_base_initializer.h) = add32c5940c922a98122d0e6883eb3ad52dc25c5
-SHA1 (patch-src_mongo_db_repl_isself.c) = c27e7ac0f19158eff9d5bf59d5d07835ab222bc4
-SHA1 (patch-src_mongo_platform_random.cpp) = 4e962e0ffdcbd80956bacebfcb052cb25508d4ca
-SHA1 (patch-src_mongo_shell_linenoise__utf8.h) = 2d18e46cb63313e6fb09714e0662c98347f4f74e
-SHA1 (patch-src_mongo_util_intrusive__counter.h) = d242db05708c999bd19f2751bdc881db50ea81f0
-SHA1 (patch-src_third__party_s2_base_port.h) = 8e715efbfcacaba51d957c21aa32ccfd3cc4f736
-SHA1 (patch-src_third__party_v8-3.25_SConscript) = a8da59130c36b2be3b89498ba0b23b1c7c9ab9e6
-SHA1 (patch-src_third__party_v8-3.25_src_platform-posix.cc) = 2fa27016a9af828d1c01815739770918a2d53d16
-SHA1 (patch-src_third__party_v8-3.25_src_platform_semaphore.cc) = 92447c13b379eeb4d9f8bac9455d78d54b4f9e32
-SHA1 (patch-src_third__party_wiredtiger_SConscript) = b9ed24d0c05e812d66941f94a77cf4c91f55d43b
-SHA1 (patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h) = e41064c0ff7268efc795782312ff413295cbcba7
+SHA1 (patch-src_mongo_db_repl_isself.c) = 8cb386b7b0a8925908f20ac9b9b18cac796367ba
+SHA1 (patch-src_mongo_platform_random.cpp) = 59c31e55fc2dc5a2b82b8f16dacf8736d8354cdb
+SHA1 (patch-src_mongo_platform_stack__locator__dragonfly.cpp) = fb885c491e4de1cfbc2875620d854af726e5b45f
+SHA1 (patch-src_mongo_platform_stack__locator__netbsd.cpp) = 3b09e86b2401555b6ab4c31d14c0693d766119c2
+SHA1 (patch-src_mongo_shell_linenoise__utf8.h) = f975925f56125d48b5124894fa1adf1382a634d2
+SHA1 (patch-src_mongo_util_intrusive__counter.h) = 9f1af59e1bc86e33bf183a6dda1737007afc7a18
+SHA1 (patch-src_mongo_util_processinfo__dragonfly.cpp) = 62c236ce820dfe81f45625b15e022cca0f2c10ee
+SHA1 (patch-src_mongo_util_processinfo__netbsd.cpp) = 4c746c4c3a79df849994c00a4639662d8a2c799d
+SHA1 (patch-src_third__party_mozjs-38_platform_x86__64_netbsd_build_js-confdefs.h) = 81107c2d368884dc0d2fddc03862fe58f2035206
+SHA1 (patch-src_third__party_mozjs-38_platform_x86__64_netbsd_include_js-config.h) = f2b90732fd18048cf7feac44cca54c99a2420a4a
+SHA1 (patch-src_third__party_s2_base_port.h) = 892ce91b5aaa432f34e1e7c169b7fd6eea2a3e94
+SHA1 (patch-src_third__party_wiredtiger_SConscript) = 2b023c7299a7c81c5e5314f8ff181d7ca834e933
+SHA1 (patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h) = 0b00da401f832d985107dfa5dcc6447db4beec6d
+SHA1 (patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h) = 63d3a0cc66d9fcc76b21150de8be1b6e050b7d8d
diff --git a/databases/mongodb/patches/patch-SConstruct b/databases/mongodb/patches/patch-SConstruct
index 7cfe02b6d69..58a50996f3e 100644
--- a/databases/mongodb/patches/patch-SConstruct
+++ b/databases/mongodb/patches/patch-SConstruct
@@ -1,69 +1,95 @@
-$NetBSD: patch-SConstruct,v 1.2 2015/05/05 15:54:49 joerg Exp $
+$NetBSD: patch-SConstruct,v 1.3 2016/02/12 03:37:24 ryoon Exp $
Add support for NetBSD/Dragonfly, fix locations.
---- SConstruct.orig 2015-04-08 20:28:08.000000000 +0000
+--- SConstruct.orig 2016-01-05 18:31:44.000000000 +0000
+++ SConstruct
-@@ -53,7 +53,9 @@ nix = False
- linux = False
- darwin = False
- windows = False
-+dragonfly = False
- freebsd = False
-+netbsd = False
- openbsd = False
- solaris = False
-
-@@ -65,8 +67,12 @@ elif platform.startswith("linux"):
- platform = "linux"
- elif "sunos5" == platform:
- solaris = True
-+elif platform.startswith( "dragonfly" ):
-+ dragonfly = True
- elif platform.startswith( "freebsd" ):
- freebsd = True
-+elif platform.startswith( "netbsd" ):
-+ netbsd = True
- elif platform.startswith( "openbsd" ):
- openbsd = True
- elif "win32" == platform:
-@@ -571,6 +577,7 @@ envDict = dict(BUILD_ROOT=buildDir,
- CONFIGUREDIR=sconsDataDir.Dir('sconf_temp'),
- CONFIGURELOG=sconsDataDir.File('config.log'),
+@@ -40,8 +40,12 @@ def get_running_os_name():
+ running_os = os.sys.platform
+ if running_os.startswith('linux'):
+ running_os = 'linux'
++ elif running_os.startswith('dragonfly'):
++ running_os = 'dragonfly'
+ elif running_os.startswith('freebsd'):
+ running_os = 'freebsd'
++ elif running_os.startswith('netbsd'):
++ running_os = 'netbsd'
+ elif running_os.startswith('openbsd'):
+ running_os = 'openbsd'
+ elif running_os == 'sunos5':
+@@ -59,7 +63,7 @@ def env_get_os_name_wrapper(self):
+
+ def is_os_raw(target_os, os_list_to_check):
+ okay = False
+- posix_os_list = [ 'linux', 'openbsd', 'freebsd', 'osx', 'solaris' ]
++ posix_os_list = [ 'linux', 'openbsd', 'freebsd', 'osx', 'solaris', 'dragonfly', 'netbsd' ]
+
+ for p in os_list_to_check:
+ if p == 'posix' and target_os in posix_os_list:
+@@ -754,7 +758,7 @@ def printLocalInfo():
+
+ printLocalInfo()
+
+-boostLibs = [ "thread" , "filesystem" , "program_options", "system", "regex", "chrono" ]
++boostLibs = [ "thread" , "filesystem" , "program_options", "system", "regex", "chrono" ]
+
+ onlyServer = len( COMMAND_LINE_TARGETS ) == 0 or ( len( COMMAND_LINE_TARGETS ) == 1 and str( COMMAND_LINE_TARGETS[0] ) in [ "mongod" , "mongos" , "test" ] )
+
+@@ -815,6 +819,7 @@ envDict = dict(BUILD_ROOT=buildDir,
INSTALL_DIR=installDir,
-+ ENV = os.environ
+ CONFIG_HEADER_DEFINES={},
+ LIBDEPS_TAG_EXPANSIONS=[],
++ ENV = os.environ,
)
- if windows:
-@@ -848,6 +855,12 @@ elif solaris:
- env.Append( CPPDEFINES=[ "__sunos__" ] )
+ env = Environment(variables=env_vars, **envDict)
+@@ -925,7 +930,9 @@ def CheckForProcessor(context, which_arc
+ os_macros = {
+ "windows": "_WIN32",
+ "solaris": "__sun",
++ "dragonfly": "__DragonFly__",
+ "freebsd": "__FreeBSD__",
++ "netbsd": "__NetBSD__",
+ "openbsd": "__OpenBSD__",
+ "osx": "__APPLE__",
+ "linux": "__linux__",
+@@ -1184,7 +1191,7 @@ if env['_LIBDEPS'] == '$_LIBDEPS_OBJS':
+
+ libdeps.setup_environment(env, emitting_shared=(link_model.startswith("dynamic")))
+
+-if env.TargetOSIs('linux', 'freebsd', 'openbsd'):
++if env.TargetOSIs('linux', 'dragonfly', 'freebsd', 'netbsd', 'openbsd'):
+ env['LINK_LIBGROUP_START'] = '-Wl,--start-group'
+ env['LINK_LIBGROUP_END'] = '-Wl,--end-group'
+ env['LINK_WHOLE_ARCHIVE_START'] = '-Wl,--whole-archive'
+@@ -1212,10 +1219,24 @@ if env.TargetOSIs('linux'):
+ elif env.TargetOSIs('solaris'):
env.Append( LIBS=["socket","resolv","lgrp"] )
+elif os.sys.platform.startswith( "dragonfly" ):
+ env.Append( CPPPATH=[ "/usr/pkg/include" ] )
+ env.Append( LIBPATH=[ "/usr/pkg/lib" ] )
+ env.Append( LIBS=[ "m" ] )
++ env.Append( LIBS=[ "kvm" ] )
+ env.Append( CPPDEFINES=[ "__dragonfly__" ] )
+
- elif freebsd:
+ elif env.TargetOSIs('freebsd'):
env.Append( LIBS=[ "kvm" ] )
- env.Append( EXTRACPPPATH=[ "/usr/local/include" ] )
-@@ -855,6 +868,12 @@ elif freebsd:
- env.Append( CPPDEFINES=[ "__freebsd__" ] )
env.Append( CCFLAGS=[ "-fno-omit-frame-pointer" ] )
+elif os.sys.platform.startswith( "netbsd" ):
+ env.Append( CPPPATH=[ "/usr/pkg/include" ] )
+ env.Append( LIBPATH=[ "/usr/pkg/lib" ] )
+ env.Append( LIBS=[ "m" ] )
++ env.Append( LIBS=[ "kvm" ] )
+ env.Append( CPPDEFINES=[ "__netbsd__" ] )
+
- elif openbsd:
- env.Append( EXTRACPPPATH=[ "/usr/local/include" ] )
- env.Append( EXTRALIBPATH=[ "/usr/local/lib" ] )
-@@ -1020,8 +1039,11 @@ if nix:
+ elif env.TargetOSIs('openbsd'):
+ env.Append( LIBS=[ "kvm" ] )
+
+@@ -1382,8 +1403,11 @@ if env.TargetOSIs('posix'):
+ if not has_option("disable-warnings-as-errors"):
env.Append( CCFLAGS=["-Werror"] )
- env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
+ env.Append( CPPDEFINES=["XP_UNIX=1"] )
env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
+ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
@@ -72,21 +98,20 @@ Add support for NetBSD/Dragonfly, fix locations.
# SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
# startup.
-@@ -2163,7 +2185,7 @@ def doConfigure(myenv):
- Exit(1)
+@@ -2245,6 +2269,7 @@ def doConfigure(myenv):
+ # permit more than four parameters.
+ "BOOST_THREAD_DONT_PROVIDE_VARIADIC_THREAD",
+ "BOOST_SYSTEM_NO_DEPRECATED",
++ "BOOST_OPTIONAL_USE_SINGLETON_DEFINITION_OF_NONE",
+ ]
+ )
+
+@@ -2311,7 +2336,7 @@ def doConfigure(myenv):
+ myenv.ConfError("Couldn't find SASL header/libraries")
# requires ports devel/libexecinfo to be installed
-- if freebsd or openbsd:
-+ if freebsd or openbsd or netbsd or dragonfly:
+- if env.TargetOSIs('freebsd', 'openbsd'):
++ if env.TargetOSIs('dragonfly', 'freebsd', 'netbsd', 'openbsd'):
if not conf.CheckLib("execinfo"):
- print("Cannot find libexecinfo, please install devel/libexecinfo.")
- Exit(1)
-@@ -2409,7 +2431,7 @@ Export("mongoCodeVersion")
- Export("usev8")
- Export("v8version v8suffix")
- Export("boostSuffix")
--Export("darwin windows solaris linux freebsd nix openbsd")
-+Export("darwin windows solaris linux freebsd nix openbsd netbsd dragonfly")
- Export('module_sconscripts')
- Export("debugBuild optBuild")
- Export("s3push")
+ myenv.ConfError("Cannot find libexecinfo, please install devel/libexecinfo.")
+
diff --git a/databases/mongodb/patches/patch-debian_mongod.conf b/databases/mongodb/patches/patch-debian_mongod.conf
index 22cb1fa47c5..cba226cd781 100644
--- a/databases/mongodb/patches/patch-debian_mongod.conf
+++ b/databases/mongodb/patches/patch-debian_mongod.conf
@@ -1,7 +1,7 @@
-$NetBSD: patch-debian_mongod.conf,v 1.2 2015/10/18 05:45:37 ryoon Exp $
+$NetBSD: patch-debian_mongod.conf,v 1.3 2016/02/12 03:37:24 ryoon Exp $
Use proper paths in default config file.
---- debian/mongod.conf.orig 2015-10-12 20:46:18.000000000 +0000
+--- debian/mongod.conf.orig 2016-01-05 18:31:44.000000000 +0000
+++ debian/mongod.conf
@@ -5,7 +5,7 @@
@@ -17,7 +17,7 @@ Use proper paths in default config file.
destination: file
logAppend: true
- path: /var/log/mongodb/mongod.log
-+ path: @MONGODB_LOGPATH@/mongod.log
++ path: @MONGODB_DBPATH@/mongod.log
# network interfaces
net:
diff --git a/databases/mongodb/patches/patch-src_mongo_db_repl_isself.c b/databases/mongodb/patches/patch-src_mongo_db_repl_isself.c
index 6b075743ad6..f83a0925c0b 100644
--- a/databases/mongodb/patches/patch-src_mongo_db_repl_isself.c
+++ b/databases/mongodb/patches/patch-src_mongo_db_repl_isself.c
@@ -1,15 +1,15 @@
-$NetBSD: patch-src_mongo_db_repl_isself.c,v 1.2 2015/08/26 05:03:00 fhajny Exp $
+$NetBSD: patch-src_mongo_db_repl_isself.c,v 1.3 2016/02/12 03:37:24 ryoon Exp $
* Add NetBSD support.
---- src/mongo/db/repl/isself.cpp.orig 2015-08-24 00:39:52.000000000 +0000
+--- src/mongo/db/repl/isself.cpp.orig 2016-01-05 18:31:44.000000000 +0000
+++ src/mongo/db/repl/isself.cpp
@@ -48,7 +48,7 @@
#include "mongo/util/log.h"
- #if defined(__linux__) || defined(__APPLE__) || defined(__freebsd__) || defined(__sunos__) || \
-- defined(__openbsd__)
-+ defined(__openbsd__) || defined(__netbsd__)
+ #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) || \
+- defined(__OpenBSD__)
++ defined(__OpenBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
#define FASTPATH_UNIX 1
#endif
@@ -17,8 +17,8 @@ $NetBSD: patch-src_mongo_db_repl_isself.c,v 1.2 2015/08/26 05:03:00 fhajny Exp $
#include <ifaddrs.h>
#include <netdb.h>
--#ifdef __freebsd__
-+#if defined __freebsd__ || defined __netbsd__
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <netinet/in.h>
#endif
diff --git a/databases/mongodb/patches/patch-src_mongo_platform_random.cpp b/databases/mongodb/patches/patch-src_mongo_platform_random.cpp
index 35fa7cccdbb..606d47b4230 100644
--- a/databases/mongodb/patches/patch-src_mongo_platform_random.cpp
+++ b/databases/mongodb/patches/patch-src_mongo_platform_random.cpp
@@ -1,14 +1,14 @@
-$NetBSD: patch-src_mongo_platform_random.cpp,v 1.2 2015/08/26 05:03:00 fhajny Exp $
+$NetBSD: patch-src_mongo_platform_random.cpp,v 1.3 2016/02/12 03:37:24 ryoon Exp $
Add NetBSD support.
---- src/mongo/platform/random.cpp.orig 2015-08-24 00:39:52.000000000 +0000
+--- src/mongo/platform/random.cpp.orig 2016-01-05 18:31:44.000000000 +0000
+++ src/mongo/platform/random.cpp
-@@ -116,7 +116,7 @@ SecureRandom* SecureRandom::create() {
+@@ -145,7 +145,7 @@ SecureRandom* SecureRandom::create() {
return new WinSecureRandom();
}
--#elif defined(__linux__) || defined(__sunos__) || defined(__APPLE__) || defined(__freebsd__)
-+#elif defined(__linux__) || defined(__sunos__) || defined(__APPLE__) || defined(__freebsd__) || defined(__netbsd__)
+-#elif defined(__linux__) || defined(__sun) || defined(__APPLE__) || defined(__FreeBSD__)
++#elif defined(__linux__) || defined(__sun) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
class InputStreamSecureRandom : public SecureRandom {
public:
diff --git a/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__dragonfly.cpp b/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__dragonfly.cpp
new file mode 100644
index 00000000000..a8a71cdcdcb
--- /dev/null
+++ b/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__dragonfly.cpp
@@ -0,0 +1,63 @@
+$NetBSD: patch-src_mongo_platform_stack__locator__dragonfly.cpp,v 1.1 2016/02/12 03:37:24 ryoon Exp $
+
+--- src/mongo/platform/stack_locator_dragonfly.cpp.orig 2016-02-11 11:27:13.489023328 +0000
++++ src/mongo/platform/stack_locator_dragonfly.cpp
+@@ -0,0 +1,58 @@
++/**
++ * Copyright (C) 2015 MongoDB Inc.
++ *
++ * This program is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Affero General Public License, version 3,
++ * as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU Affero General Public License for more details.
++ *
++ * You should have received a copy of the GNU Affero General Public License
++ * along with this program. If not, see <http://www.gnu.org/licenses/>.
++ *
++ * As a special exception, the copyright holders give permission to link the
++ * code of portions of this program with the OpenSSL library under certain
++ * conditions as described in each individual source file and distribute
++ * linked combinations including the program with the OpenSSL library. You
++ * must comply with the GNU Affero General Public License in all respects for
++ * all of the code used other than as permitted herein. If you modify file(s)
++ * with this exception, you may extend this exception to your version of the
++ * file(s), but you are not obligated to do so. If you do not wish to do so,
++ * delete this exception statement from your version. If you delete this
++ * exception statement from all source files in the program, then also delete
++ * it in the license file.
++ */
++
++#include "mongo/platform/basic.h"
++
++#include "mongo/platform/stack_locator.h"
++
++#include <pthread.h>
++#include <pthread_np.h>
++
++#include "mongo/util/assert_util.h"
++#include "mongo/util/scopeguard.h"
++
++namespace mongo {
++
++StackLocator::StackLocator() {
++ pthread_attr_t attr;
++ size_t size;
++
++ pthread_t self = pthread_self();
++
++ invariant(pthread_attr_init(&attr) == 0);
++ ON_BLOCK_EXIT(pthread_attr_destroy, &attr);
++
++ invariant(pthread_attr_get_np(self, &attr) == 0);
++
++ invariant(pthread_attr_getstack(&attr, &_end, &size) == 0);
++
++ // TODO: Assumes stack grows downward on FreeBSD
++ _begin = static_cast<char*>(_end) + size;
++}
++
++} // namespace mongo
diff --git a/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp b/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp
new file mode 100644
index 00000000000..37cf2925324
--- /dev/null
+++ b/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp
@@ -0,0 +1,63 @@
+$NetBSD: patch-src_mongo_platform_stack__locator__netbsd.cpp,v 1.1 2016/02/12 03:37:24 ryoon Exp $
+
+--- src/mongo/platform/stack_locator_netbsd.cpp.orig 2016-02-11 12:24:33.443209041 +0000
++++ src/mongo/platform/stack_locator_netbsd.cpp
+@@ -0,0 +1,58 @@
++/**
++ * Copyright (C) 2015 MongoDB Inc.
++ *
++ * This program is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Affero General Public License, version 3,
++ * as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU Affero General Public License for more details.
++ *
++ * You should have received a copy of the GNU Affero General Public License
++ * along with this program. If not, see <http://www.gnu.org/licenses/>.
++ *
++ * As a special exception, the copyright holders give permission to link the
++ * code of portions of this program with the OpenSSL library under certain
++ * conditions as described in each individual source file and distribute
++ * linked combinations including the program with the OpenSSL library. You
++ * must comply with the GNU Affero General Public License in all respects for
++ * all of the code used other than as permitted herein. If you modify file(s)
++ * with this exception, you may extend this exception to your version of the
++ * file(s), but you are not obligated to do so. If you do not wish to do so,
++ * delete this exception statement from your version. If you delete this
++ * exception statement from all source files in the program, then also delete
++ * it in the license file.
++ */
++
++#include "mongo/platform/basic.h"
++
++#include "mongo/platform/stack_locator.h"
++
++#include <pthread.h>
++
++
++#include "mongo/util/assert_util.h"
++#include "mongo/util/scopeguard.h"
++
++namespace mongo {
++
++StackLocator::StackLocator() {
++ pthread_attr_t attr;
++ size_t size;
++
++ pthread_t self = pthread_self();
++
++ invariant(pthread_attr_init(&attr) == 0);
++ ON_BLOCK_EXIT(pthread_attr_destroy, &attr);
++
++ invariant(pthread_attr_get_np(self, &attr) == 0);
++
++ invariant(pthread_attr_getstack(&attr, &_end, &size) == 0);
++
++ // TODO: Assumes stack grows downward on FreeBSD
++ _begin = static_cast<char*>(_end) + size;
++}
++
++} // namespace mongo
diff --git a/databases/mongodb/patches/patch-src_mongo_shell_linenoise__utf8.h b/databases/mongodb/patches/patch-src_mongo_shell_linenoise__utf8.h
index 8e48d2a97cd..9ace20b4b1e 100644
--- a/databases/mongodb/patches/patch-src_mongo_shell_linenoise__utf8.h
+++ b/databases/mongodb/patches/patch-src_mongo_shell_linenoise__utf8.h
@@ -1,17 +1,17 @@
-$NetBSD: patch-src_mongo_shell_linenoise__utf8.h,v 1.2 2015/08/26 05:03:00 fhajny Exp $
+$NetBSD: patch-src_mongo_shell_linenoise__utf8.h,v 1.3 2016/02/12 03:37:24 ryoon Exp $
Use Boost swap instead of std. Fixes build on SunOS.
---- src/mongo/shell/linenoise_utf8.h.orig 2015-08-24 00:39:52.000000000 +0000
+--- src/mongo/shell/linenoise_utf8.h.orig 2016-01-05 18:31:44.000000000 +0000
+++ src/mongo/shell/linenoise_utf8.h
@@ -27,6 +27,7 @@
* then also delete it in the license file.
*/
+#include <boost/core/swap.hpp>
- #include <boost/smart_ptr/scoped_array.hpp>
#include <algorithm>
+ #include <memory>
#include <string.h>
-@@ -173,9 +174,9 @@ struct UtfStringMixin {
+@@ -178,9 +179,9 @@ struct UtfStringMixin {
}
void swap(UtfStringMixin& other) {
diff --git a/databases/mongodb/patches/patch-src_mongo_util_intrusive__counter.h b/databases/mongodb/patches/patch-src_mongo_util_intrusive__counter.h
index 6a4320b99c0..396c3a27ca9 100644
--- a/databases/mongodb/patches/patch-src_mongo_util_intrusive__counter.h
+++ b/databases/mongodb/patches/patch-src_mongo_util_intrusive__counter.h
@@ -1,6 +1,6 @@
-$NetBSD: patch-src_mongo_util_intrusive__counter.h,v 1.1 2015/05/05 15:54:49 joerg Exp $
+$NetBSD: patch-src_mongo_util_intrusive__counter.h,v 1.2 2016/02/12 03:37:24 ryoon Exp $
---- src/mongo/util/intrusive_counter.h.orig 2015-05-05 12:50:27.000000000 +0000
+--- src/mongo/util/intrusive_counter.h.orig 2016-01-05 18:31:44.000000000 +0000
+++ src/mongo/util/intrusive_counter.h
@@ -28,6 +28,7 @@
@@ -8,5 +8,5 @@ $NetBSD: patch-src_mongo_util_intrusive__counter.h,v 1.1 2015/05/05 15:54:49 joe
+#include <cstdlib>
#include <boost/intrusive_ptr.hpp>
- #include <boost/noncopyable.hpp>
- #include "mongo/platform/atomic_word.h"
+ #include <stdlib.h>
+
diff --git a/databases/mongodb/patches/patch-src_mongo_util_processinfo__dragonfly.cpp b/databases/mongodb/patches/patch-src_mongo_util_processinfo__dragonfly.cpp
new file mode 100644
index 00000000000..3bb24028040
--- /dev/null
+++ b/databases/mongodb/patches/patch-src_mongo_util_processinfo__dragonfly.cpp
@@ -0,0 +1,195 @@
+$NetBSD: patch-src_mongo_util_processinfo__dragonfly.cpp,v 1.1 2016/02/12 03:37:24 ryoon Exp $
+
+--- src/mongo/util/processinfo_dragonfly.cpp.orig 2016-02-11 12:26:02.935580479 +0000
++++ src/mongo/util/processinfo_dragonfly.cpp
+@@ -0,0 +1,190 @@
++/* Copyright 2012 10gen Inc.
++ *
++ * This program is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Affero General Public License, version 3,
++ * as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU Affero General Public License for more details.
++ *
++ * You should have received a copy of the GNU Affero General Public License
++ * along with this program. If not, see <http://www.gnu.org/licenses/>.
++ *
++ * As a special exception, the copyright holders give permission to link the
++ * code of portions of this program with the OpenSSL library under certain
++ * conditions as described in each individual source file and distribute
++ * linked combinations including the program with the OpenSSL library. You
++ * must comply with the GNU Affero General Public License in all respects
++ * for all of the code used other than as permitted herein. If you modify
++ * file(s) with this exception, you may extend this exception to your
++ * version of the file(s), but you are not obligated to do so. If you do not
++ * wish to do so, delete this exception statement from your version. If you
++ * delete this exception statement from all source files in the program,
++ * then also delete it in the license file.
++ */
++
++#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl
++
++#include <cstdlib>
++#include <string>
++
++#include <kvm.h>
++#include <sys/file.h>
++#include <sys/mman.h>
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#include <sys/types.h>
++#include <sys/user.h>
++#include <sys/vmmeter.h>
++#include <unistd.h>
++#include <vm/vm_param.h>
++
++#include "mongo/util/scopeguard.h"
++#include "mongo/util/log.h"
++#include "processinfo.h"
++
++using namespace std;
++
++namespace mongo {
++
++ProcessInfo::ProcessInfo(ProcessId pid) : _pid(pid) {}
++
++ProcessInfo::~ProcessInfo() {}
++
++/**
++ * Get a sysctl string value by name. Use string specialization by default.
++ */
++template <typename T>
++int getSysctlByNameWithDefault(const char* sysctlName, const T& defaultValue, T* result);
++
++template <>
++int getSysctlByNameWithDefault<uintptr_t>(const char* sysctlName,
++ const uintptr_t& defaultValue,
++ uintptr_t* result) {
++ uintptr_t value = 0;
++ size_t len = sizeof(value);
++ if (sysctlbyname(sysctlName, &value, &len, NULL, 0) == -1) {
++ *result = defaultValue;
++ return errno;
++ }
++ if (len > sizeof(value)) {
++ *result = defaultValue;
++ return EINVAL;
++ }
++
++ *result = value;
++ return 0;
++}
++
++template <>
++int getSysctlByNameWithDefault<string>(const char* sysctlName,
++ const string& defaultValue,
++ string* result) {
++ char value[256] = {0};
++ size_t len = sizeof(value);
++ if (sysctlbyname(sysctlName, &value, &len, NULL, 0) == -1) {
++ *result = defaultValue;
++ return errno;
++ }
++ *result = value;
++ return 0;
++}
++
++bool ProcessInfo::checkNumaEnabled() {
++ return false;
++}
++
++int ProcessInfo::getVirtualMemorySize() {
++ kvm_t* kd = NULL;
++ int cnt = 0;
++ char err[_POSIX2_LINE_MAX] = {0};
++ if ((kd = kvm_open(NULL, "/dev/null", "/dev/null", O_RDONLY, err)) == NULL)
++ return -1;
++ kinfo_proc* task = kvm_getprocs(kd, KERN_PROC_PID, _pid.toNative(), &cnt);
++ kvm_close(kd);
++ return task->ki_size / 1024 / 1024; // convert from bytes to MB
++}
++
++int ProcessInfo::getResidentSize() {
++ kvm_t* kd = NULL;
++ int cnt = 0;
++ char err[_POSIX2_LINE_MAX] = {0};
++ if ((kd = kvm_open(NULL, "/dev/null", "/dev/null", O_RDONLY, err)) == NULL)
++ return -1;
++ kinfo_proc* task = kvm_getprocs(kd, KERN_PROC_PID, _pid.toNative(), &cnt);
++ kvm_close(kd);
++ return task->ki_rssize * sysconf(_SC_PAGESIZE) / 1024 / 1024; // convert from pages to MB
++}
++
++double ProcessInfo::getSystemMemoryPressurePercentage() {
++ return 0.0;
++}
++
++void ProcessInfo::SystemInfo::collectSystemInfo() {
++ osType = "BSD";
++ osName = "FreeBSD";
++
++ int status = getSysctlByNameWithDefault("kern.version", string("unknown"), &osVersion);
++ if (status != 0)
++ log() << "Unable to collect OS Version. (errno: " << status << " msg: " << strerror(status)
++ << ")" << endl;
++
++ status = getSysctlByNameWithDefault("hw.machine_arch", string("unknown"), &cpuArch);
++ if (status != 0)
++ log() << "Unable to collect Machine Architecture. (errno: " << status
++ << " msg: " << strerror(status) << ")" << endl;
++ addrSize = cpuArch.find("64") != std::string::npos ? 64 : 32;
++
++ uintptr_t numBuffer;
++ uintptr_t defaultNum = 1;
++ status = getSysctlByNameWithDefault("hw.physmem", defaultNum, &numBuffer);
++ memSize = numBuffer;
++ if (status != 0)
++ log() << "Unable to collect Physical Memory. (errno: " << status
++ << " msg: " << strerror(status) << ")" << endl;
++
++ status = getSysctlByNameWithDefault("hw.ncpu", defaultNum, &numBuffer);
++ numCores = numBuffer;
++ if (status != 0)
++ log() << "Unable to collect Number of CPUs. (errno: " << status
++ << " msg: " << strerror(status) << ")" << endl;
++
++ pageSize = static_cast<unsigned long long>(sysconf(_SC_PAGESIZE));
++
++ hasNuma = checkNumaEnabled();
++}
++
++void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {}
++
++bool ProcessInfo::supported() {
++ return true;
++}
++
++bool ProcessInfo::blockCheckSupported() {
++ return true;
++}
++
++bool ProcessInfo::blockInMemory(const void* start) {
++ char x = 0;
++ if (mincore(alignToStartOfPage(start), getPageSize(), &x)) {
++ log() << "mincore failed: " << errnoWithDescription() << endl;
++ return 1;
++ }
++ return x & 0x1;
++}
++
++bool ProcessInfo::pagesInMemory(const void* start, size_t numPages, vector<char>* out) {
++ out->resize(numPages);
++ // int mincore(const void *addr, size_t len, char *vec);
++ if (mincore(alignToStartOfPage(start), numPages * getPageSize(), &(out->front()))) {
++ log() << "mincore failed: " << errnoWithDescription() << endl;
++ return false;
++ }
++ for (size_t i = 0; i < numPages; ++i) {
++ (*out)[i] = 0x1;
++ }
++ return true;
++}
++}
diff --git a/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp b/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp
new file mode 100644
index 00000000000..7aa93a919b2
--- /dev/null
+++ b/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp
@@ -0,0 +1,218 @@
+$NetBSD: patch-src_mongo_util_processinfo__netbsd.cpp,v 1.1 2016/02/12 03:37:24 ryoon Exp $
+
+--- src/mongo/util/processinfo_netbsd.cpp.orig 2016-02-11 22:14:23.486964953 +0000
++++ src/mongo/util/processinfo_netbsd.cpp
+@@ -0,0 +1,213 @@
++/* Copyright 2012 10gen Inc.
++ *
++ * This program is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Affero General Public License, version 3,
++ * as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU Affero General Public License for more details.
++ *
++ * You should have received a copy of the GNU Affero General Public License
++ * along with this program. If not, see <http://www.gnu.org/licenses/>.
++ *
++ * As a special exception, the copyright holders give permission to link the
++ * code of portions of this program with the OpenSSL library under certain
++ * conditions as described in each individual source file and distribute
++ * linked combinations including the program with the OpenSSL library. You
++ * must comply with the GNU Affero General Public License in all respects
++ * for all of the code used other than as permitted herein. If you modify
++ * file(s) with this exception, you may extend this exception to your
++ * version of the file(s), but you are not obligated to do so. If you do not
++ * wish to do so, delete this exception statement from your version. If you
++ * delete this exception statement from all source files in the program,
++ * then also delete it in the license file.
++ */
++
++#if defined(__NetBSD__)
++#define _KMEMUSER
++#endif
++
++#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl
++
++#include <cstdlib>
++#include <string>
++
++#include <kvm.h>
++#include <sys/file.h>
++#include <sys/mman.h>
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#include <sys/types.h>
++#include <sys/user.h>
++#include <sys/vmmeter.h>
++#include <unistd.h>
++
++#include "mongo/util/scopeguard.h"
++#include "mongo/util/log.h"
++#include "processinfo.h"
++
++using namespace std;
++
++namespace mongo {
++
++ProcessInfo::ProcessInfo(ProcessId pid) : _pid(pid) {}
++
++ProcessInfo::~ProcessInfo() {}
++
++/**
++ * Get a sysctl string value by name. Use string specialization by default.
++ */
++template <typename T>
++int getSysctlByIDWithDefault(const int* sysctlID,
++ const int idLen,
++ const T& defaultValue,
++ T* result);
++
++template <>
++int getSysctlByIDWithDefault<uintptr_t>(const int* sysctlID,
++ const int idLen,
++ const uintptr_t& defaultValue,
++ uintptr_t* result) {
++ uintptr_t value = 0;
++ size_t len = sizeof(value);
++ if (sysctl(sysctlID, idLen, &value, &len, NULL, 0) == -1) {
++ *result = defaultValue;
++ return errno;
++ }
++ if (len > sizeof(value)) {
++ *result = defaultValue;
++ return EINVAL;
++ }
++
++ *result = value;
++ return 0;
++}
++
++template <>
++int getSysctlByIDWithDefault<string>(const int* sysctlID,
++ const int idLen,
++ const string& defaultValue,
++ string* result) {
++ char value[256] = {0};
++ size_t len = sizeof(value);
++ if (sysctl(sysctlID, idLen, &value, &len, NULL, 0) == -1) {
++ *result = defaultValue;
++ return errno;
++ }
++ *result = value;
++ return 0;
++}
++
++bool ProcessInfo::checkNumaEnabled() {
++ return false;
++}
++
++int ProcessInfo::getVirtualMemorySize() {
++ kvm_t* kd = NULL;
++ int cnt = 0;
++ char err[_POSIX2_LINE_MAX] = {0};
++ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, err)) == NULL) {
++ log() << "Unable to get virt mem size: " << err << endl;
++ return -1;
++ }
++
++ kinfo_proc2* task = kvm_getproc2(kd, KERN_PROC_PID, _pid.toNative(), sizeof(kinfo_proc2), &cnt);
++ kvm_close(kd);
++ return ((task->p_vm_dsize + task->p_vm_ssize + task->p_vm_tsize) * sysconf(_SC_PAGESIZE)) /
++ 1048576;
++}
++
++int ProcessInfo::getResidentSize() {
++ kvm_t* kd = NULL;
++ int cnt = 0;
++ char err[_POSIX2_LINE_MAX] = {0};
++ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, err)) == NULL) {
++ log() << "Unable to get res mem size: " << err << endl;
++ return -1;
++ }
++ kinfo_proc2* task = kvm_getproc2(kd, KERN_PROC_PID, _pid.toNative(), sizeof(kinfo_proc2), &cnt);
++ kvm_close(kd);
++ return (task->p_vm_rssize * sysconf(_SC_PAGESIZE)) / 1048576; // convert from pages to MB
++}
++
++double ProcessInfo::getSystemMemoryPressurePercentage() {
++ return 0.0;
++}
++
++void ProcessInfo::SystemInfo::collectSystemInfo() {
++ osType = "BSD";
++ osName = "NetBSD";
++ int mib[2];
++
++ mib[0] = CTL_KERN;
++ mib[1] = KERN_VERSION;
++ int status = getSysctlByIDWithDefault(mib, 2, string("unknown"), &osVersion);
++ if (status != 0)
++ log() << "Unable to collect OS Version. (errno: " << status << " msg: " << strerror(status)
++ << ")" << endl;
++
++ mib[0] = CTL_HW;
++ mib[1] = HW_MACHINE;
++ status = getSysctlByIDWithDefault(mib, 2, string("unknown"), &cpuArch);
++ if (status != 0)
++ log() << "Unable to collect Machine Architecture. (errno: " << status
++ << " msg: " << strerror(status) << ")" << endl;
++ addrSize = cpuArch.find("64") != std::string::npos ? 64 : 32;
++
++ uintptr_t numBuffer;
++ uintptr_t defaultNum = 1;
++ mib[0] = CTL_HW;
++ mib[1] = HW_PHYSMEM;
++ status = getSysctlByIDWithDefault(mib, 2, defaultNum, &numBuffer);
++ memSize = numBuffer;
++ if (status != 0)
++ log() << "Unable to collect Physical Memory. (errno: " << status
++ << " msg: " << strerror(status) << ")" << endl;
++
++ mib[0] = CTL_HW;
++ mib[1] = HW_NCPU;
++ status = getSysctlByIDWithDefault(mib, 2, defaultNum, &numBuffer);
++ numCores = numBuffer;
++ if (status != 0)
++ log() << "Unable to collect Number of CPUs. (errno: " << status
++ << " msg: " << strerror(status) << ")" << endl;
++
++ pageSize = static_cast<unsigned long long>(sysconf(_SC_PAGESIZE));
++
++ hasNuma = checkNumaEnabled();
++}
++
++void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {}
++
++bool ProcessInfo::supported() {
++ return true;
++}
++
++bool ProcessInfo::blockCheckSupported() {
++ return true;
++}
++
++bool ProcessInfo::blockInMemory(const void* start) {
++ char x = 0;
++ if (mincore((void*)alignToStartOfPage(start), getPageSize(), &x)) {
++ log() << "mincore failed: " << errnoWithDescription() << endl;
++ return 1;
++ }
++ return x & 0x1;
++}
++
++bool ProcessInfo::pagesInMemory(const void* start, size_t numPages, vector<char>* out) {
++ out->resize(numPages);
++ // int mincore(const void *addr, size_t len, char *vec);
++ if (mincore((void*)alignToStartOfPage(start), numPages * getPageSize(), &(out->front()))) {
++ log() << "mincore failed: " << errnoWithDescription() << endl;
++ return false;
++ }
++ for (size_t i = 0; i < numPages; ++i) {
++ (*out)[i] = 0x1;
++ }
++ return true;
++}
++}
diff --git a/databases/mongodb/patches/patch-src_third__party_mozjs-38_platform_x86__64_netbsd_build_js-confdefs.h b/databases/mongodb/patches/patch-src_third__party_mozjs-38_platform_x86__64_netbsd_build_js-confdefs.h
new file mode 100644
index 00000000000..95faf35c058
--- /dev/null
+++ b/databases/mongodb/patches/patch-src_third__party_mozjs-38_platform_x86__64_netbsd_build_js-confdefs.h
@@ -0,0 +1,20 @@
+$NetBSD: patch-src_third__party_mozjs-38_platform_x86__64_netbsd_build_js-confdefs.h,v 1.1 2016/02/12 03:37:24 ryoon Exp $
+
+--- src/third_party/mozjs-38/platform/x86_64/netbsd/build/js-confdefs.h.orig 2016-02-11 12:42:39.272068631 +0000
++++ src/third_party/mozjs-38/platform/x86_64/netbsd/build/js-confdefs.h
+@@ -19,7 +19,6 @@
+ #define HAVE_CPUID_H 1
+ #define HAVE_DIRENT_H 1
+ #define HAVE_DLOPEN 1
+-#define HAVE_ENDIAN_H 1
+ #define HAVE_EXPM1 1
+ #define HAVE_GETC_UNLOCKED 1
+ #define HAVE_GETOPT_H 1
+@@ -54,7 +53,6 @@
+ #define JS_CODEGEN_X64 1
+ #define JS_CPU_X64 1
+ #define JS_DEFAULT_JITREPORT_GRANULARITY 3
+-#define JS_HAVE_ENDIAN_H 1
+ #define JS_HAVE_MACHINE_ENDIAN_H 1
+ #define JS_POSIX_NSPR 1
+ #define JS_PUNBOX64 1
diff --git a/databases/mongodb/patches/patch-src_third__party_mozjs-38_platform_x86__64_netbsd_include_js-config.h b/databases/mongodb/patches/patch-src_third__party_mozjs-38_platform_x86__64_netbsd_include_js-config.h
new file mode 100644
index 00000000000..62f838d6a6f
--- /dev/null
+++ b/databases/mongodb/patches/patch-src_third__party_mozjs-38_platform_x86__64_netbsd_include_js-config.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_third__party_mozjs-38_platform_x86__64_netbsd_include_js-config.h,v 1.1 2016/02/12 03:37:24 ryoon Exp $
+
+--- src/third_party/mozjs-38/platform/x86_64/netbsd/include/js-config.h.orig 2016-02-11 12:24:33.328723425 +0000
++++ src/third_party/mozjs-38/platform/x86_64/netbsd/include/js-config.h
+@@ -36,7 +36,7 @@
+
+ /* Define to 1 if the <endian.h> header is present and
+ useable. See jscpucfg.h. */
+-#define JS_HAVE_ENDIAN_H 1
++/* #undef JS_HAVE_ENDIAN_H */
+
+ /* Define to 1 if the <machine/endian.h> header is present and
+ useable. See jscpucfg.h. */
diff --git a/databases/mongodb/patches/patch-src_third__party_s2_base_port.h b/databases/mongodb/patches/patch-src_third__party_s2_base_port.h
index e6ceedac287..91db0ba883a 100644
--- a/databases/mongodb/patches/patch-src_third__party_s2_base_port.h
+++ b/databases/mongodb/patches/patch-src_third__party_s2_base_port.h
@@ -1,15 +1,15 @@
-$NetBSD: patch-src_third__party_s2_base_port.h,v 1.1 2015/05/02 08:10:33 ryoon Exp $
+$NetBSD: patch-src_third__party_s2_base_port.h,v 1.2 2016/02/12 03:37:24 ryoon Exp $
* Add NetBSD support.
---- src/third_party/s2/base/port.h.orig 2015-04-08 20:28:08.000000000 +0000
+--- src/third_party/s2/base/port.h.orig 2016-01-05 18:31:44.000000000 +0000
+++ src/third_party/s2/base/port.h
@@ -102,7 +102,7 @@ typedef uint16_t u_int16_t;
#endif
--#if defined __sunos__ || defined __freebsd__ || defined __openbsd__
-+#if defined __sunos__ || defined __freebsd__ || defined __openbsd__ || defined __netbsd__
+-#if defined __sun || defined __FreeBSD__ || defined __OpenBSD__
++#if defined __sun || defined __FreeBSD__ || defined __OpenBSD__ || defined __DragonFly__ || defined __NetBSD__
#ifdef _LITTLE_ENDIAN
#define IS_LITTLE_ENDIAN
#elif defined _BIG_ENDIAN
@@ -17,7 +17,7 @@ $NetBSD: patch-src_third__party_s2_base_port.h,v 1.1 2015/05/02 08:10:33 ryoon E
#define bswap_16(x) swap16(x)
#define bswap_32(x) swap32(x)
#define bswap_64(x) swap64(x)
-+#elif defined __netbsd__
++#elif defined __NetBSD__
+#include <machine/bswap.h>
+#define bswap_16(x) bswap16(x)
+#define bswap_32(x) bswap32(x)
diff --git a/databases/mongodb/patches/patch-src_third__party_v8-3.25_SConscript b/databases/mongodb/patches/patch-src_third__party_v8-3.25_SConscript
deleted file mode 100644
index 2619f141fe9..00000000000
--- a/databases/mongodb/patches/patch-src_third__party_v8-3.25_SConscript
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD: patch-src_third__party_v8-3.25_SConscript,v 1.1 2015/05/02 08:10:33 ryoon Exp $
-
-* Treat NetBSD like OpenBSD.
-
---- src/third_party/v8-3.25/SConscript.orig 2015-04-08 20:28:08.000000000 +0000
-+++ src/third_party/v8-3.25/SConscript
-@@ -32,7 +32,7 @@ root_dir = dirname(File('SConscript').rf
- sys.path.insert(0, join(root_dir, 'tools'))
- import js2c
-
--Import("env windows linux darwin solaris freebsd debugBuild openbsd")
-+Import("env windows linux darwin solaris freebsd debugBuild openbsd dragonfly netbsd")
-
- # pared-down copies of the equivalent structures in v8's SConstruct/SConscript:
- LIBRARY_FLAGS = {
-@@ -313,6 +313,8 @@ SOURCES = {
- 'os:linux': ['platform-linux.cc', 'platform-posix.cc'],
- 'os:macos': ['platform-macos.cc', 'platform-posix.cc'],
- 'os:solaris': ['platform-solaris.cc', 'platform-posix.cc'],
-+ 'os:dragonfly': ['platform-freebsd.cc', 'platform-posix.cc'],
-+ 'os:netbsd': ['platform-openbsd.cc', 'platform-posix.cc'],
- 'os:nullos': ['platform-nullos.cc'],
- 'os:win32': ['platform-win32.cc', 'win32-math.cc'],
- 'mode:release': [],
-@@ -377,6 +379,10 @@ def get_options():
- os_string = 'os:solaris'
- elif openbsd:
- os_string = 'os:openbsd'
-+ elif dragonfly:
-+ os_string = 'os:dragonfly'
-+ elif netbsd:
-+ os_string = 'os:netbsd'
- else:
- os_string = 'os:nullos'
-
diff --git a/databases/mongodb/patches/patch-src_third__party_v8-3.25_src_platform-posix.cc b/databases/mongodb/patches/patch-src_third__party_v8-3.25_src_platform-posix.cc
deleted file mode 100644
index b9fa9625e01..00000000000
--- a/databases/mongodb/patches/patch-src_third__party_v8-3.25_src_platform-posix.cc
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD: patch-src_third__party_v8-3.25_src_platform-posix.cc,v 1.1 2015/05/02 08:10:33 ryoon Exp $
-
-* Add NetBSD support from lang/nodejs.
-
---- src/third_party/v8-3.25/src/platform-posix.cc.orig 2015-04-08 20:28:08.000000000 +0000
-+++ src/third_party/v8-3.25/src/platform-posix.cc
-@@ -588,8 +588,13 @@ Thread::Thread(const Options& options)
- : data_(new PlatformData),
- stack_size_(options.stack_size()),
- start_semaphore_(NULL) {
-+#if defined(__NetBSD__)
-+ if (stack_size_ > 0 && stack_size_ < sysconf(_SC_THREAD_STACK_MIN)) {
-+ stack_size_ = sysconf(_SC_THREAD_STACK_MIN);
-+#else
- if (stack_size_ > 0 && stack_size_ < PTHREAD_STACK_MIN) {
- stack_size_ = PTHREAD_STACK_MIN;
-+#endif
- }
- set_name(options.name());
- }
-@@ -605,7 +610,7 @@ static void SetThreadName(const char* na
- pthread_set_name_np(pthread_self(), name);
- #elif V8_OS_NETBSD
- STATIC_ASSERT(Thread::kMaxThreadNameLength <= PTHREAD_MAX_NAMELEN_NP);
-- pthread_setname_np(pthread_self(), "%s", name);
-+ pthread_setname_np(pthread_self(), "%s", (void *)name);
- #elif V8_OS_MACOSX
- // pthread_setname_np is only available in 10.6 or later, so test
- // for it at runtime.
diff --git a/databases/mongodb/patches/patch-src_third__party_v8-3.25_src_platform_semaphore.cc b/databases/mongodb/patches/patch-src_third__party_v8-3.25_src_platform_semaphore.cc
deleted file mode 100644
index 3e073abc5ae..00000000000
--- a/databases/mongodb/patches/patch-src_third__party_v8-3.25_src_platform_semaphore.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-$NetBSD: patch-src_third__party_v8-3.25_src_platform_semaphore.cc,v 1.2 2015/09/08 07:48:19 fhajny Exp $
-
-Work around lack of sem_timedwait(3) in NetBSD < 6.99.4.
-Adapted from d4f11c0cf476dd854eaebec1cbacb1afc7bea18e of the Chromium V8 sources.
-
---- src/third_party/v8-3.25/src/platform/semaphore.cc.orig 2015-08-24 00:39:52.000000000 +0000
-+++ src/third_party/v8-3.25/src/platform/semaphore.cc
-@@ -32,9 +32,14 @@
- #include <mach/task.h>
- #endif
-
-+#if V8_OS_NETBSD
-+#include <sys/param.h> // for __NetBSD_Version__
-+#endif
-+
- #include <errno.h>
-
- #include "checks.h"
-+#include "platform/elapsed-timer.h"
- #include "platform/time.h"
-
- namespace v8 {
-@@ -129,6 +134,17 @@ void Semaphore::Wait() {
-
-
- bool Semaphore::WaitFor(const TimeDelta& rel_time) {
-+#if V8_OS_NACL || (V8_OS_NETBSD && __NetBSD_Version__ - 0 < 699000400)
-+ // PNaCL and older NetBSD doesn't support sem_timedwait, do ugly busy waiting.
-+ ElapsedTimer timer;
-+ timer.Start();
-+ do {
-+ int result = sem_trywait(&native_handle_);
-+ if (result == 0) return true;
-+ ASSERT(errno == EAGAIN || errno == EINTR);
-+ } while (!timer.HasExpired(rel_time));
-+ return false;
-+#else
- // Compute the time for end of timeout.
- const Time time = Time::NowFromSystemTime() + rel_time;
- const struct timespec ts = time.ToTimespec();
-@@ -152,6 +168,7 @@ bool Semaphore::WaitFor(const TimeDelta&
- ASSERT_EQ(-1, result);
- ASSERT_EQ(EINTR, errno);
- }
-+#endif
- }
-
- #elif V8_OS_WIN
diff --git a/databases/mongodb/patches/patch-src_third__party_wiredtiger_SConscript b/databases/mongodb/patches/patch-src_third__party_wiredtiger_SConscript
index 4f7893c011c..efcf100ee3a 100644
--- a/databases/mongodb/patches/patch-src_third__party_wiredtiger_SConscript
+++ b/databases/mongodb/patches/patch-src_third__party_wiredtiger_SConscript
@@ -1,24 +1,19 @@
-$NetBSD: patch-src_third__party_wiredtiger_SConscript,v 1.2 2015/06/23 13:31:24 ryoon Exp $
+$NetBSD: patch-src_third__party_wiredtiger_SConscript,v 1.3 2016/02/12 03:37:24 ryoon Exp $
* Add NetBSD case.
---- src/third_party/wiredtiger/SConscript.orig 2015-06-15 15:43:51.000000000 +0000
+--- src/third_party/wiredtiger/SConscript.orig 2016-01-05 18:31:44.000000000 +0000
+++ src/third_party/wiredtiger/SConscript
-@@ -2,7 +2,7 @@
- import re
- import textwrap
-
--Import("env windows darwin solaris linux freebsd openbsd debugBuild")
-+Import("env windows darwin solaris linux freebsd openbsd netbsd debugBuild")
- Import("get_option")
-
- env = env.Clone()
-@@ -32,6 +32,8 @@ elif freebsd:
+@@ -48,8 +48,12 @@ elif env.TargetOSIs('osx'):
+ env.Append(CPPPATH=["build_darwin"])
+ elif env.TargetOSIs('solaris'):
+ env.Append(CPPPATH=["build_solaris"])
++elif env.TargetOSIs('dragonfly'):
++ env.Append(CPPPATH=["build_dragonfly"])
+ elif env.TargetOSIs('freebsd'):
env.Append(CPPPATH=["build_freebsd"])
- elif openbsd:
- env.Append(CPPPATH=["build_openbsd"])
-+elif netbsd:
++elif env.TargetOSIs('netbsd'):
+ env.Append(CPPPATH=["build_netbsd"])
- elif linux:
- env.Append(CPPPATH=["build_linux"])
- env.Append(CPPDEFINES=["_GNU_SOURCE"])
+ elif env.TargetOSIs('openbsd'):
+ env.Append(CPPPATH=["build_openbsd"])
+ elif env.TargetOSIs('linux'):
diff --git a/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h b/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h
new file mode 100644
index 00000000000..ed84687206a
--- /dev/null
+++ b/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h
@@ -0,0 +1,159 @@
+$NetBSD: patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h,v 1.1 2016/02/12 03:37:24 ryoon Exp $
+
+--- src/third_party/wiredtiger/build_dragonfly/wiredtiger_config.h.orig 2016-02-11 11:07:15.049932059 +0000
++++ src/third_party/wiredtiger/build_dragonfly/wiredtiger_config.h
+@@ -0,0 +1,154 @@
++/* wiredtiger_config.h. Generated from config.hin by configure. */
++/* build_posix/config.hin. Generated from configure.ac by autoheader. */
++
++/* Define if building universal (internal helper macro) */
++/* #undef AC_APPLE_UNIVERSAL_BUILD */
++
++/* Define to 1 to pause for debugger attach on failure. */
++/* #undef HAVE_ATTACH */
++
++/* Build the LevelDB API with Basho LevelDB support. */
++/* #undef HAVE_BASHOLEVELDB */
++
++/* Snappy support automatically loaded. */
++/* #undef HAVE_BUILTIN_EXTENSION_SNAPPY */
++
++/* Zlib support automatically loaded. */
++/* #undef HAVE_BUILTIN_EXTENSION_ZLIB */
++
++/* Define to 1 if you have the `clock_gettime' function. */
++#define HAVE_CLOCK_GETTIME 1
++
++/* Define to 1 for diagnostic tests. */
++/* #undef HAVE_DIAGNOSTIC */
++
++/* Define to 1 if you have the <dlfcn.h> header file. */
++#define HAVE_DLFCN_H 1
++
++/* Define to 1 if you have the `fallocate' function. */
++/* #undef HAVE_FALLOCATE */
++
++/* Define to 1 if you have the `fcntl' function. */
++#define HAVE_FCNTL 1
++
++/* Define to 1 if you have the `fdatasync' function. */
++/* #undef HAVE_FDATASYNC */
++
++/* Define to 1 if you have the `fread_unlocked' function. */
++/* #undef HAVE_FREAD_UNLOCKED */
++
++/* Define to 1 if you have the `ftruncate' function. */
++#define HAVE_FTRUNCATE 1
++
++/* Define to 1 if you have the `gettimeofday' function. */
++#define HAVE_GETTIMEOFDAY 1
++
++/* Build the LevelDB API with HyperLevelDB support. */
++/* #undef HAVE_HYPERLEVELDB */
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++#define HAVE_INTTYPES_H 1
++
++/* Define to 1 if you have the `bz2' library (-lbz2). */
++/* #undef HAVE_LIBBZ2 */
++
++/* Define to 1 if you have the `dl' library (-ldl). */
++/* #undef HAVE_LIBDL */
++
++/* Define to 1 if you have the `pthread' library (-lpthread). */
++#define HAVE_LIBPTHREAD 1
++
++/* Define to 1 if you have the `rt' library (-lrt). */
++#define HAVE_LIBRT 1
++
++/* Define to 1 if you have the `snappy' library (-lsnappy). */
++/* #undef HAVE_LIBSNAPPY */
++
++/* Define to 1 if you have the `z' library (-lz). */
++/* #undef HAVE_LIBZ */
++
++/* Define to 1 if you have the <memory.h> header file. */
++#define HAVE_MEMORY_H 1
++
++/* Define to 1 if you have the `posix_fadvise' function. */
++#define HAVE_POSIX_FADVISE 1
++
++/* Define to 1 if you have the `posix_fallocate' function. */
++#define HAVE_POSIX_FALLOCATE 1
++
++/* Define to 1 if you have the `posix_madvise' function. */
++#define HAVE_POSIX_MADVISE 1
++
++/* Define to 1 if you have the `posix_memalign' function. */
++#define HAVE_POSIX_MEMALIGN 1
++
++/* Define to 1 if you have the <pthread_np.h> header file. */
++#define HAVE_PTHREAD_NP_H 1
++
++/* Build the LevelDB API with RocksDB support. */
++/* #undef HAVE_ROCKSDB */
++
++/* Define to 1 if you have the <stdint.h> header file. */
++#define HAVE_STDINT_H 1
++
++/* Define to 1 if you have the <stdlib.h> header file. */
++#define HAVE_STDLIB_H 1
++
++/* Define to 1 if you have the <strings.h> header file. */
++#define HAVE_STRINGS_H 1
++
++/* Define to 1 if you have the <string.h> header file. */
++#define HAVE_STRING_H 1
++
++/* Define to 1 if you have the `strtouq' function. */
++#define HAVE_STRTOUQ 1
++
++/* Define to 1 if you have the `sync_file_range' function. */
++/* #undef HAVE_SYNC_FILE_RANGE */
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#define HAVE_SYS_STAT_H 1
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#define HAVE_SYS_TYPES_H 1
++
++/* Define to 1 if you have the <unistd.h> header file. */
++#define HAVE_UNISTD_H 1
++
++/* Enable verbose message configuration. */
++/* #undef HAVE_VERBOSE */
++
++/* Define to 1 if you have the <x86intrin.h> header file. */
++/* #undef HAVE_X86INTRIN_H */
++
++/* Spinlock type from mutex.h. */
++#define SPINLOCK_TYPE SPINLOCK_PTHREAD_MUTEX
++
++/* Define to 1 if you have the ANSI C header files. */
++#define STDC_HEADERS 1
++
++/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
++ significant byte first (like Motorola and SPARC, unlike Intel). */
++#if defined AC_APPLE_UNIVERSAL_BUILD
++# if defined __BIG_ENDIAN__
++# define WORDS_BIGENDIAN 1
++# endif
++#else
++# ifndef WORDS_BIGENDIAN
++/* # undef WORDS_BIGENDIAN */
++# endif
++#endif
++
++/* Default alignment of buffers used for I/O */
++#define WT_BUFFER_ALIGNMENT_DEFAULT 0
++
++/* Enable large inode numbers on Mac OS X 10.5. */
++#ifndef _DARWIN_USE_64_BIT_INODE
++# define _DARWIN_USE_64_BIT_INODE 1
++#endif
++
++/* Number of bits in a file offset, on hosts where this is settable. */
++/* #undef _FILE_OFFSET_BITS */
++
++/* Define for large files, on AIX-style hosts. */
++/* #undef _LARGE_FILES */
diff --git a/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h b/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h
index e6e82ece8d6..44699637702 100644
--- a/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h
+++ b/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h
@@ -1,10 +1,10 @@
-$NetBSD: patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h,v 1.1 2015/05/02 08:10:33 ryoon Exp $
+$NetBSD: patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h,v 1.2 2016/02/12 03:37:24 ryoon Exp $
* Copy from OpenBSD case.
---- src/third_party/wiredtiger/build_netbsd/wiredtiger_config.h.orig 2015-05-02 04:35:05.000000000 +0000
+--- src/third_party/wiredtiger/build_netbsd/wiredtiger_config.h.orig 2016-02-11 11:07:20.607136772 +0000
+++ src/third_party/wiredtiger/build_netbsd/wiredtiger_config.h
-@@ -0,0 +1,151 @@
+@@ -0,0 +1,154 @@
+/* wiredtiger_config.h. Generated from config.hin by configure. */
+/* build_posix/config.hin. Generated from configure.ac by autoheader. */
+
@@ -125,6 +125,9 @@ $NetBSD: patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h,v
+/* Enable verbose message configuration. */
+/* #undef HAVE_VERBOSE */
+
++/* Define to 1 if you have the <x86intrin.h> header file. */
++/* #undef HAVE_X86INTRIN_H */
++
+/* Spinlock type from mutex.h. */
+#define SPINLOCK_TYPE SPINLOCK_PTHREAD_MUTEX
+