diff options
author | bptato <nincsnevem662@gmail.com> | 2022-12-05 08:30:18 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-12-05 08:31:54 +0100 |
commit | 50c5e6a417a9f3c20224779304d912d2ac837271 (patch) | |
tree | 7591e6ef25d4798f5a2cb9660e61610216518931 /src/ips | |
parent | d42cec62dbfdcd4058ba878e5a43d9bb4205070f (diff) | |
download | chawan-50c5e6a417a9f3c20224779304d912d2ac837271.tar.gz |
Fix hack of previous commit
Diffstat (limited to 'src/ips')
-rw-r--r-- | src/ips/socketstream.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ips/socketstream.nim b/src/ips/socketstream.nim index 5c3ad622..d3b262ed 100644 --- a/src/ips/socketstream.nim +++ b/src/ips/socketstream.nim @@ -44,7 +44,8 @@ proc sendFileHandle*(s: SocketStream, fd: FileHandle) = hdr.msg_iovlen = 1 hdr.msg_control = cmsgbuf # ...this is stupid. - cast[ptr uint16](hdr.msg_controllen)[] = cast[ptr uint16](CMSG_LEN(csize_t(sizeof(FileHandle))))[] + var xl = CMSG_LEN(csize_t(sizeof(FileHandle))) + cast[ptr uint16](addr hdr.msg_controllen)[] = cast[ptr uint16](addr xl)[] let cmsg = CMSG_FIRSTHDR(addr hdr) cmsg.cmsg_len = CMSG_LEN(csize_t(sizeof(FileHandle))) cmsg.cmsg_level = SOL_SOCKET |