naive work-around for time redefinition (#5193)
This commit is contained in:
parent
06740d674b
commit
5f6f444d55
2 changed files with 10 additions and 8 deletions
|
|
@ -117,10 +117,11 @@ else:
|
||||||
schedh = "#define _GNU_SOURCE\n#include <sched.h>"
|
schedh = "#define _GNU_SOURCE\n#include <sched.h>"
|
||||||
pthreadh = "#define _GNU_SOURCE\n#include <pthread.h>"
|
pthreadh = "#define _GNU_SOURCE\n#include <pthread.h>"
|
||||||
|
|
||||||
when defined(linux):
|
when not declared(Time):
|
||||||
type Time = clong
|
when defined(linux):
|
||||||
else:
|
type Time = clong
|
||||||
type Time = int
|
else:
|
||||||
|
type Time = int
|
||||||
|
|
||||||
type
|
type
|
||||||
SysThread* {.importc: "pthread_t", header: "<sys/types.h>",
|
SysThread* {.importc: "pthread_t", header: "<sys/types.h>",
|
||||||
|
|
|
||||||
|
|
@ -78,10 +78,11 @@ elif defined(posixRealtime):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# fallback Posix implementation:
|
# fallback Posix implementation:
|
||||||
when defined(linux):
|
when not declared(Time):
|
||||||
type Time = clong
|
when defined(linux):
|
||||||
else:
|
type Time = clong
|
||||||
type Time = int
|
else:
|
||||||
|
type Time = int
|
||||||
|
|
||||||
type
|
type
|
||||||
Timeval {.importc: "struct timeval", header: "<sys/select.h>",
|
Timeval {.importc: "struct timeval", header: "<sys/select.h>",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue