Commit cc01a8a4 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot 8

Allow the time remaining parameter to nanosleep to be null

Summary: Pah! This definitely wasn't causing the lock tests to segfault. Nope, not at all <_>.

Reviewed By: yfeldblum

Differential Revision: D3691120

fbshipit-source-id: 6601db637f22c7b0bc326907a2a7976f6df7c159
parent 4a0d0c51
...@@ -320,8 +320,10 @@ tm* localtime_r(const time_t* t, tm* o) { ...@@ -320,8 +320,10 @@ tm* localtime_r(const time_t* t, tm* o) {
int nanosleep(const struct timespec* request, struct timespec* remain) { int nanosleep(const struct timespec* request, struct timespec* remain) {
Sleep((DWORD)((request->tv_sec * 1000) + (request->tv_nsec / 1000000))); Sleep((DWORD)((request->tv_sec * 1000) + (request->tv_nsec / 1000000)));
remain->tv_nsec = 0; if (remain != nullptr) {
remain->tv_sec = 0; remain->tv_nsec = 0;
remain->tv_sec = 0;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment