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.
This commit is contained in:
LemonBoy 2018-09-15 17:54:58 +02:00
commit a2a06d43f2
2 changed files with 3 additions and 3 deletions

View file

@ -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