diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-10-13 20:54:16 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-10-13 20:54:19 +0200 |
commit | 4ed26277347c4b1c6d20d6ea913bb40d75eff810 (patch) | |
tree | ab30d054fceb264ed00cd83f6683929271558f54 /depends/patches | |
parent | 633c4a1f3690152bdda4b0ac7bcfde22c237183e (diff) | |
parent | 49be9f0c88b2bb8d1409c138f92e0cf753807353 (diff) | |
download | bitcoin-4ed26277347c4b1c6d20d6ea913bb40d75eff810.tar.xz |
Merge #8899: [0.13] Fix wake from sleep issue with Boost 1.59.0
49be9f0 Fix wake from sleep issue with Boost 1.59.0 (Michael Ford)
Diffstat (limited to 'depends/patches')
-rw-r--r-- | depends/patches/boost/fix-win-wake-from-sleep.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/depends/patches/boost/fix-win-wake-from-sleep.patch b/depends/patches/boost/fix-win-wake-from-sleep.patch new file mode 100644 index 0000000000..8fb4d3028b --- /dev/null +++ b/depends/patches/boost/fix-win-wake-from-sleep.patch @@ -0,0 +1,31 @@ +--- old/libs/thread/src/win32/thread.cpp ++++ new/libs/thread/src/win32/thread.cpp +@@ -645,7 +645,7 @@ + } Detailed; + } Reason; + } REASON_CONTEXT, *PREASON_CONTEXT; +- static REASON_CONTEXT default_reason_context={0/*POWER_REQUEST_CONTEXT_VERSION*/, 0x00000001/*POWER_REQUEST_CONTEXT_SIMPLE_STRING*/, (LPWSTR)L"generic"}; ++ //static REASON_CONTEXT default_reason_context={0/*POWER_REQUEST_CONTEXT_VERSION*/, 0x00000001/*POWER_REQUEST_CONTEXT_SIMPLE_STRING*/, (LPWSTR)L"generic"}; + typedef BOOL (WINAPI *setwaitabletimerex_t)(HANDLE, const LARGE_INTEGER *, LONG, PTIMERAPCROUTINE, LPVOID, PREASON_CONTEXT, ULONG); + static inline BOOL WINAPI SetWaitableTimerEx_emulation(HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, PREASON_CONTEXT WakeContext, ULONG TolerableDelay) + { +@@ -715,7 +715,8 @@ + if(time_left.milliseconds/20>tolerable) // 5% + tolerable=time_left.milliseconds/20; + LARGE_INTEGER due_time=get_due_time(target_time); +- bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,&detail_::default_reason_context,tolerable)!=0; ++ //bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,&detail_::default_reason_context,tolerable)!=0; ++ bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,NULL,tolerable)!=0; + if(set_time_succeeded) + { + timeout_index=handle_count; +@@ -799,7 +800,8 @@ + if(time_left.milliseconds/20>tolerable) // 5% + tolerable=time_left.milliseconds/20; + LARGE_INTEGER due_time=get_due_time(target_time); +- bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,&detail_::default_reason_context,tolerable)!=0; ++ //bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,&detail_::default_reason_context,tolerable)!=0; ++ bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,NULL,tolerable)!=0; + if(set_time_succeeded) + { + timeout_index=handle_count; |