summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorEuan <euantorano@users.noreply.github.com>2019-11-11 15:18:08 +0000
committerAndreas Rumpf <rumpf_a@web.de>2019-11-11 16:18:08 +0100
commit7e689873e203620c3a14f1697129cd0e3fd548e4 (patch)
treeb6d7e3c10a6e50c9f19c3aed022a7c3dfafa69e0 /lib/system
parent0c4d81241a168010ddaf53f5d651b649f7218240 (diff)
downloadNim-7e689873e203620c3a14f1697129cd0e3fd548e4.tar.gz
Fix #12135 and #12109 (#12137)
* Fix #12135 and fix #12109 - fix OpenBSD type defs

* Fix Mode definition as in #12132
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/threadlocalstorage.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/system/threadlocalstorage.nim b/lib/system/threadlocalstorage.nim
index 9903fce3f..aea56e4e7 100644
--- a/lib/system/threadlocalstorage.nim
+++ b/lib/system/threadlocalstorage.nim
@@ -132,6 +132,13 @@ else:
         abi: array[56 div sizeof(clong), clong]
       ThreadVarSlot {.importc: "pthread_key_t",
                     header: "<sys/types.h>".} = distinct cuint
+  elif defined(openbsd) and defined(amd64):
+    type
+      SysThread* {.importc: "pthread_t", header: "<pthread.h>".} = object
+      Pthread_attr {.importc: "pthread_attr_t",
+                       header: "<pthread.h>".} = object
+      ThreadVarSlot {.importc: "pthread_key_t",
+                     header: "<pthread.h>".} = cint
   else:
     type
       SysThread* {.importc: "pthread_t", header: "<sys/types.h>".} = object