summaryrefslogtreecommitdiffstats
path: root/libs/wt/patches/100-fix_random_dev.patch
blob: 977611ce4a4947796066ad9272208b46cd84a11a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- a/src/web/random_device.cpp
+++ b/src/web/random_device.cpp
@@ -39,16 +39,6 @@
 #endif
 
 #ifdef USE_URANDOM
-#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-//  A definition is required even for integral static constants
-const bool boost::random_device::has_fixed_range;
-const boost::random_device::result_type boost::random_device::min_value;
-const boost::random_device::result_type boost::random_device::max_value;
-#endif
-
-// the default is the unlimited capacity device, using some secure hash
-// try "/dev/random" for blocking when the entropy pool has drained
-const char * const boost::random_device::default_token = "/dev/urandom";
 
 /*
  * This uses the POSIX interface for unbuffered reading.
@@ -119,7 +109,6 @@
 #include <windows.h>
 #include <wincrypt.h>
 #include <stdexcept>
-const char * const boost::random_device::default_token = "";
 
 // Note about thread-safety: according to my reading of the MSDN page 
 // 'Threading Issues with Cryptographic Service Providers', both the
@@ -156,6 +145,10 @@
 };
 #endif
 
+BOOST_RANDOM_DECL boost::random::random_device::random_device()
+  : pimpl(new impl("/dev/urandom"))
+{}
+
 boost::random_device::random_device(const std::string& token)
   : pimpl(new impl(token))
 {