mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 13:53:11 +00:00
Fix a compilation error.
This regression was introduced by
1b0e4abbfd (Port mq_get() to MinGW.).
This commit is contained in:
@@ -13,15 +13,17 @@ mq_nanosleep(unsigned ns)
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
Sleep(ns / 1000);
|
Sleep(ns / 1000);
|
||||||
#else
|
#else
|
||||||
struct timespec timeout;
|
{
|
||||||
|
struct timespec timeout;
|
||||||
|
|
||||||
if (ns < 1000*1000*1000) {
|
if (ns < 1000*1000*1000) {
|
||||||
timeout.tv_sec = 0;
|
timeout.tv_sec = 0;
|
||||||
timeout.tv_nsec = ns;
|
timeout.tv_nsec = ns;
|
||||||
} else {
|
} else {
|
||||||
timeout.tv_sec = 1;
|
timeout.tv_sec = 1;
|
||||||
timeout.tv_nsec = 0;
|
timeout.tv_nsec = 0;
|
||||||
|
}
|
||||||
|
nanosleep(&timeout, NULL);
|
||||||
}
|
}
|
||||||
nanosleep(&timeout, NULL);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user