Fix a compilation error.
This regression was introduced by
1b0e4abbfd
(Port mq_get() to MinGW.).
This commit is contained in:
parent
e42c309eba
commit
e475ff1600
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user