From: Sage Weil Date: Mon, 29 Aug 2016 15:55:24 +0000 (-0400) Subject: Revert "uuid: use boost::random:random_device" X-Git-Tag: v0.94.9~1^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=21f6f1da0764e1a003a43ef73d6788bdfc3ef848;p=ceph.git Revert "uuid: use boost::random:random_device" This reverts commit 187d308b5b0cb0512b442bbad1bddfda8ef9203f. This breaks precise builds. --- diff --git a/ceph.spec.in b/ceph.spec.in index ab3b1284951b..b1c83c63436d 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -50,7 +50,6 @@ BuildRequires: sharutils %endif BuildRequires: gcc-c++ BuildRequires: boost-devel -BuildRequires: boost-random %if 0%{defined suse_version} BuildRequires: libbz2-devel %else diff --git a/configure.ac b/configure.ac index 9f480984397e..ff2c35b2bd46 100644 --- a/configure.ac +++ b/configure.ac @@ -883,17 +883,6 @@ BOOST_THREAD_LIBS="${LIBS}" LIBS="${saved_LIBS}" AC_SUBST(BOOST_THREAD_LIBS) -# boost-random -BOOST_RANDOM_LIBS="" -saved_LIBS="${LIBS}" -LIBS="" -AC_CHECK_LIB(boost_random, main, [], - [AC_CHECK_LIB(boost_random, main, [], - AC_MSG_FAILURE(["Boost random library not found."]))]) -BOOST_RANDOM_LIBS="${LIBS}" -LIBS="${saved_LIBS}" -AC_SUBST(BOOST_RANDOM_LIBS) - # # Check for boost_program_options library (defines BOOST_PROGRAM_OPTIONS_LIBS). # diff --git a/debian/control b/debian/control index bce749bbc9c9..c16db0f550dd 100644 --- a/debian/control +++ b/debian/control @@ -27,7 +27,6 @@ Build-Depends: autoconf, libboost-program-options-dev (>= 1.42), libboost-system-dev (>= 1.42), libboost-thread-dev (>= 1.42), - libboost-random-dev, libcurl4-gnutls-dev, libedit-dev, libexpat1-dev, diff --git a/src/common/Makefile.am b/src/common/Makefile.am index ed37ceffb29e..8fa29899c10f 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -134,8 +134,7 @@ noinst_HEADERS += \ LIBCOMMON_DEPS += \ $(LIBERASURE_CODE) \ $(LIBMSG) $(LIBAUTH) \ - $(LIBCRUSH) $(LIBJSON_SPIRIT) $(LIBLOG) $(LIBARCH) \ - $(BOOST_RANDOM_LIBS) + $(LIBCRUSH) $(LIBJSON_SPIRIT) $(LIBLOG) $(LIBARCH) if LINUX LIBCOMMON_DEPS += -lrt diff --git a/src/include/uuid.h b/src/include/uuid.h index 03e6b5ad32c7..df9e71a46622 100644 --- a/src/include/uuid.h +++ b/src/include/uuid.h @@ -11,7 +11,6 @@ #include #include #include -#include struct uuid_d { boost::uuids::uuid uuid; @@ -26,8 +25,7 @@ struct uuid_d { } void generate_random() { - boost::random::random_device rng("/dev/urandom"); - boost::uuids::basic_random_generator gen(&rng); + boost::uuids::random_generator gen; uuid = gen(); }