summary refs log tree commit diff stats
path: root/lib/posix/posix_other.nim
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2018-09-15 17:54:58 +0200
committerLemonBoy <thatlemon@gmail.com>2018-09-15 20:43:08 +0200
commita2a06d43f239933f0961ee903a167ae149b02606 (patch)
tree881311df2d02748137be2392cd75add61a8a1d8c /lib/posix/posix_other.nim
parent0c04b80651ff591beadb873c8814168e66e6b722 (diff)
downloadNim-a2a06d43f239933f0961ee903a167ae149b02606.tar.gz
Fix connectUnix/bindUnix with abstract socket paths
The only way to make this work for both abstract and non-abstract
sockets is to send the kernel an incomplete structure.

Reported by Epictek on the forum.
Diffstat (limited to 'lib/posix/posix_other.nim')
-rw-r--r--lib/posix/posix_other.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/posix/posix_other.nim b/lib/posix/posix_other.nim
index 99d67824e..ba1dd89ed 100644
--- a/lib/posix/posix_other.nim
+++ b/lib/posix/posix_other.nim
@@ -410,7 +410,7 @@ else:
 
 type
   Socklen* {.importc: "socklen_t", header: "<sys/socket.h>".} = cuint
-  TSa_Family* {.importc: "sa_family_t", header: "<sys/socket.h>".} = cint
+  TSa_Family* {.importc: "sa_family_t", header: "<sys/socket.h>".} = cushort
 
   SockAddr* {.importc: "struct sockaddr", header: "<sys/socket.h>",
               pure, final.} = object ## struct sockaddr