mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-16 23:51:44 +03:00
Fix a compilation error.
This regression was introduced by
1b0e4abbfd (Port mq_get() to MinGW.).
This commit is contained in:
parent
e42c309eba
commit
e475ff1600
1 changed files with 10 additions and 8 deletions
|
|
@ -13,15 +13,17 @@ mq_nanosleep(unsigned ns)
|
|||
#ifdef _WIN32
|
||||
Sleep(ns / 1000);
|
||||
#else
|
||||
struct timespec timeout;
|
||||
{
|
||||
struct timespec timeout;
|
||||
|
||||
if (ns < 1000*1000*1000) {
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_nsec = ns;
|
||||
} else {
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_nsec = 0;
|
||||
if (ns < 1000*1000*1000) {
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_nsec = ns;
|
||||
} else {
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_nsec = 0;
|
||||
}
|
||||
nanosleep(&timeout, NULL);
|
||||
}
|
||||
nanosleep(&timeout, NULL);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue