]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "uuid: use boost::random:random_device"
authorSage Weil <sage@redhat.com>
Mon, 29 Aug 2016 15:55:24 +0000 (11:55 -0400)
committerSage Weil <sage@redhat.com>
Mon, 29 Aug 2016 15:55:24 +0000 (11:55 -0400)
This reverts commit 187d308b5b0cb0512b442bbad1bddfda8ef9203f.

This breaks precise builds.

ceph.spec.in
configure.ac
debian/control
src/common/Makefile.am
src/include/uuid.h

index ab3b1284951b388581f3928c9b138cda6aa10614..b1c83c63436df1bdd555154e5bf2987213bc6696 100644 (file)
@@ -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
index 9f480984397eea1cd983c6029d4a143319569eae..ff2c35b2bd46ff8917bbd15a957c02af68a46773 100644 (file)
@@ -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).
 #
index bce749bbc9c9929681ad863dbae4032621fb2ce0..c16db0f550ddbdc0be1eae743fec49a187d339d5 100644 (file)
@@ -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,
index ed37ceffb29e1e37188f36e806a01c3c3b98c5e6..8fa29899c10f9debc8755950e6dce4c3b71a13da 100644 (file)
@@ -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
index 03e6b5ad32c798402a4375d584ebb41890f629fd..df9e71a466224ca31d6060817322f6a7d4a653b1 100644 (file)
@@ -11,7 +11,6 @@
 #include <boost/uuid/uuid.hpp>
 #include <boost/uuid/uuid_generators.hpp>
 #include <boost/uuid/uuid_io.hpp>
-#include <boost/random/random_device.hpp>
 
 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<boost::random::random_device> gen(&rng);
+    boost::uuids::random_generator gen;
     uuid = gen();
   }