mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-27 05:15:09 +00:00
naive work-around for time redefinition (#5193)
This commit is contained in:
committed by
Andreas Rumpf
parent
06740d674b
commit
5f6f444d55
@@ -117,10 +117,11 @@ else:
|
||||
schedh = "#define _GNU_SOURCE\n#include <sched.h>"
|
||||
pthreadh = "#define _GNU_SOURCE\n#include <pthread.h>"
|
||||
|
||||
when defined(linux):
|
||||
type Time = clong
|
||||
else:
|
||||
type Time = int
|
||||
when not declared(Time):
|
||||
when defined(linux):
|
||||
type Time = clong
|
||||
else:
|
||||
type Time = int
|
||||
|
||||
type
|
||||
SysThread* {.importc: "pthread_t", header: "<sys/types.h>",
|
||||
|
||||
@@ -78,10 +78,11 @@ elif defined(posixRealtime):
|
||||
|
||||
else:
|
||||
# fallback Posix implementation:
|
||||
when defined(linux):
|
||||
type Time = clong
|
||||
else:
|
||||
type Time = int
|
||||
when not declared(Time):
|
||||
when defined(linux):
|
||||
type Time = clong
|
||||
else:
|
||||
type Time = int
|
||||
|
||||
type
|
||||
Timeval {.importc: "struct timeval", header: "<sys/select.h>",
|
||||
|
||||
Reference in New Issue
Block a user