fix rlock compilation failure (#15584)

* change SysLockType_Reentrant

fix edge case where using SysLockType_Reentrant doesn't trigger an #include pthread.h

* syslocktype_reentrant now a var
* remove nodecl to remove empty system_syslocks.c
* let is better than var.

in reality SysLockType = enum, maybe that would be a better fix
This commit is contained in:
shirleyquirk 2020-10-15 11:54:01 +01:00 • committed by GitHub
commit 4ef255b69d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,7 @@ proc initRLock*(lock: var RLock) {.inline.} =
when defined(posix):
var a: SysLockAttr
initSysLockAttr(a)
setSysLockType(a, SysLockType_Reentrant())
setSysLockType(a, SysLockType_Reentrant)
initSysLock(lock, a.addr)
else:
initSysLock(lock)