mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
Avoid potential build error
This commit is contained in:
parent
03875beadb
commit
0d6ff04b87
3 changed files with 6 additions and 3 deletions
|
@ -26,6 +26,7 @@
|
|||
#include "libc/nt/synchronization.h"
|
||||
#include "libc/nt/thread.h"
|
||||
#include "libc/nt/time.h"
|
||||
#ifdef __x86_64__
|
||||
|
||||
#define _CLOCK_REALTIME 0
|
||||
#define _CLOCK_MONOTONIC 1
|
||||
|
@ -112,3 +113,5 @@ textwindows int sys_clock_gettime_nt(int clock, struct timespec *ts) {
|
|||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __x86_64__
|
||||
|
|
|
@ -40,9 +40,9 @@ static clock_gettime_f *__clock_gettime_get(void) {
|
|||
return cgt;
|
||||
} else if (__syslib) {
|
||||
return (void *)__syslib->__clock_gettime;
|
||||
#ifdef __x86_64__
|
||||
} else if (IsWindows()) {
|
||||
return sys_clock_gettime_nt;
|
||||
#ifdef __x86_64__
|
||||
} else if (IsXnu()) {
|
||||
return sys_clock_gettime_xnu;
|
||||
#endif
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "libc/intrin/fds.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/nomultics.h"
|
||||
#include "libc/intrin/safemacros.h"
|
||||
#include "libc/intrin/strace.h"
|
||||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/macros.h"
|
||||
|
@ -873,7 +872,8 @@ RestartOperation:
|
|||
now = timespec_mono();
|
||||
if (timespec_cmp(now, deadline) >= 0)
|
||||
return etimedout();
|
||||
ms = min(-1u, timespec_tomillis(timespec_sub(deadline, now)));
|
||||
ms = timespec_tomillis(timespec_sub(deadline, now));
|
||||
ms = ms > -1u ? -1u : ms;
|
||||
goto RestartOperation;
|
||||
}
|
||||
return got;
|
||||
|
|
Loading…
Reference in a new issue