mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
Avoid boost::uuids::entropy_error on some systems
This commit is contained in:
parent
bd899a2806
commit
227a302903
|
@ -4,6 +4,7 @@ Eulisse, Giulio
|
|||
Karabowicz, Radoslaw
|
||||
Kretz, Matthias <kretz@kde.org>
|
||||
Krzewicki, Mikolaj
|
||||
Mrnjavac, Teo <teo.m@cern.ch>
|
||||
Neskovic, Gvozden
|
||||
Richter, Matthias
|
||||
Uhlig, Florian
|
||||
|
|
|
@ -19,10 +19,9 @@
|
|||
#include "FairMQParser.h"
|
||||
#include "FairMQSuboptParser.h"
|
||||
|
||||
#include "tools/Unique.h"
|
||||
|
||||
#include <boost/algorithm/string.hpp> // join/split
|
||||
#include <boost/uuid/uuid.hpp>
|
||||
#include <boost/uuid/uuid_generators.hpp>
|
||||
#include <boost/uuid/uuid_io.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iomanip>
|
||||
|
@ -227,7 +226,7 @@ void FairMQProgOptions::ParseCmdLine(const int argc, char const* const* argv, bo
|
|||
|
||||
void FairMQProgOptions::ParseDefaults()
|
||||
{
|
||||
vector<string> emptyArgs = {"dummy", "--id", boost::uuids::to_string(boost::uuids::random_generator()())};
|
||||
vector<string> emptyArgs = {"dummy", "--id", tools::Uuid()};
|
||||
|
||||
vector<const char*> argv(emptyArgs.size());
|
||||
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
|
||||
#include <fairmq/tools/Unique.h>
|
||||
|
||||
// We have to force boost::uuids to rely on /dev/*random instead of getrandom(2) or getentropy(3)
|
||||
// otherwise on some systems we'd get boost::uuids::entropy_error
|
||||
#define BOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX
|
||||
|
||||
#include <boost/uuid/uuid.hpp>
|
||||
#include <boost/uuid/uuid_generators.hpp>
|
||||
#include <boost/uuid/uuid_io.hpp>
|
||||
|
|
Loading…
Reference in New Issue
Block a user