wt: fix compile errors
authorFelix Fietkau <nbd@openwrt.org>
Mon, 11 Jun 2012 21:57:32 +0000 (21:57 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 11 Jun 2012 21:57:32 +0000 (21:57 +0000)
SVN-Revision: 32210

libs/wt/patches/100-fix_random_dev.patch [new file with mode: 0644]

diff --git a/libs/wt/patches/100-fix_random_dev.patch b/libs/wt/patches/100-fix_random_dev.patch
new file mode 100644 (file)
index 0000000..977611c
--- /dev/null
@@ -0,0 +1,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))
+ {