Repository: mesos Updated Branches: refs/heads/master d5d44d123 -> 42971bd95
Fixed a compiler error in UUID on OSX. Review: https://reviews.apache.org/r/38481 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/42971bd9 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/42971bd9 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/42971bd9 Branch: refs/heads/master Commit: 42971bd95bfc2630e52888a0388e0a691ccaef00 Parents: d5d44d1 Author: haosdent huang <[email protected]> Authored: Fri Sep 18 09:22:57 2015 -0700 Committer: Benjamin Mahler <[email protected]> Committed: Fri Sep 18 09:22:57 2015 -0700 ---------------------------------------------------------------------- 3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/42971bd9/3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp index 67f1984..bc167f1 100644 --- a/3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp +++ b/3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp @@ -30,8 +30,11 @@ struct UUID : boost::uuids::uuid public: static UUID random() { - static THREAD_LOCAL boost::uuids::random_generator* generator = - new boost::uuids::random_generator(); + static THREAD_LOCAL boost::uuids::random_generator* generator = NULL; + + if (generator == NULL) { + generator = new boost::uuids::random_generator(); + } return UUID((*generator)()); }
