wt: fix compile errors
git-svn-id: svn://svn.openwrt.org/openwrt/packages@32210 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
11c0d35f1b
commit
c045c7fc09
38
libs/wt/patches/100-fix_random_dev.patch
Normal file
38
libs/wt/patches/100-fix_random_dev.patch
Normal file
@ -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))
|
||||||
|
{
|
Loading…
x
Reference in New Issue
Block a user