From ef224c3547b31e8a9aecad7750487e09d68e00f0 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 8 Nov 2017 19:52:36 -0500 Subject: [PATCH] RethinkDB build fix. --- controller/RethinkDB.hpp | 7 ++++++- make-linux.mk | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/controller/RethinkDB.hpp b/controller/RethinkDB.hpp index 6efa56248..561cbdab1 100644 --- a/controller/RethinkDB.hpp +++ b/controller/RethinkDB.hpp @@ -45,6 +45,11 @@ public: virtual void nodeIsOnline(const uint64_t networkId,const uint64_t memberId); protected: + struct _PairHasher + { + inline std::size_t operator()(const std::pair &p) const { return (std::size_t)(p.first ^ p.second); } + }; + std::string _host; std::string _db; std::string _auth; @@ -58,7 +63,7 @@ protected: BlockingQueue< nlohmann::json * > _commitQueue; std::thread _commitThread[ZT_CONTROLLER_RETHINKDB_COMMIT_THREADS]; - std::unordered_map< std::pair,int64_t > _lastOnline; + std::unordered_map< std::pair,int64_t,_PairHasher > _lastOnline; mutable std::mutex _lastOnline_l; std::thread _onlineNotificationThread; diff --git a/make-linux.mk b/make-linux.mk index 877d6dc9d..742f6870c 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -268,7 +268,7 @@ official-static: FORCE central-controller: FORCE cd ext/librethinkdbxx ; make - make -j4 LDLIBS="ext/librethinkdbxx/build/librethinkdb++.a" DEFS="-DZT_CONTROLLER_USE_RETHINKDB" one + make LDLIBS="ext/librethinkdbxx/build/librethinkdb++.a" DEFS="-DZT_CONTROLLER_USE_RETHINKDB" one debug: FORCE make ZT_DEBUG=1 one