diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-03-04 23:20:06 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-03-04 23:20:06 +0100 |
commit | 0ff56a65897a62a0346a31afdb7ecbd8c4c72b65 (patch) | |
tree | c52d4d5957e8e62c37b4ead48e641046515bd441 | |
parent | 13699c596ea40abc0df380a6d1b2f72cfda72372 (diff) | |
parent | 39e797080d4f4ad7494323365f6bf33709ac5ed6 (diff) | |
download | Nim-0ff56a65897a62a0346a31afdb7ecbd8c4c72b65.tar.gz |
Merge pull request #3931 from yglukhov/pthread-stuff
Fixed includes for pthread types
-rw-r--r-- | lib/system/syslocks.nim | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/system/syslocks.nim b/lib/system/syslocks.nim index a91a5e7d4..1551a4121 100644 --- a/lib/system/syslocks.nim +++ b/lib/system/syslocks.nim @@ -74,11 +74,14 @@ when defined(Windows): else: type SysLock {.importc: "pthread_mutex_t", pure, final, - header: "<sys/types.h>".} = object + header: """#include <sys/types.h> + #include <pthread.h>""".} = object SysLockAttr {.importc: "pthread_mutexattr_t", pure, final - header: "<sys/types.h>".} = object + header: """#include <sys/types.h> + #include <pthread.h>""".} = object SysCond {.importc: "pthread_cond_t", pure, final, - header: "<sys/types.h>".} = object + header: """#include <sys/types.h> + #include <pthread.h>""".} = object SysLockType = distinct cint proc SysLockType_Reentrant: SysLockType = @@ -92,7 +95,7 @@ else: proc setSysLockType(a: var SysLockAttr, t: SysLockType) {. importc: "pthread_mutexattr_settype", header: "<pthread.h>", noSideEffect.} - + proc acquireSys(L: var SysLock) {.noSideEffect, importc: "pthread_mutex_lock", header: "<pthread.h>".} proc tryAcquireSysAux(L: var SysLock): cint {.noSideEffect, @@ -115,4 +118,3 @@ else: proc deinitSysCond(cond: var SysCond) {.noSideEffect, importc: "pthread_cond_destroy", header: "<pthread.h>".} - |