diff --git a/lib/system/threads.nim b/lib/system/threads.nim index f61cc4280f..2c10e02443 100644 --- a/lib/system/threads.nim +++ b/lib/system/threads.nim @@ -642,7 +642,10 @@ when defined(windows): elif defined(linux): proc syscall(arg: clong): clong {.varargs, importc: "syscall", header: "".} - var NR_gettid {.importc: "__NR_gettid", header: "".}: int + when defined(amd64): + const NR_gettid = clong(186) + else: + var NR_gettid {.importc: "__NR_gettid", header: "".}: clong proc getThreadId*(): int = ## get the ID of the currently running thread.