diff options
author | bptato <nincsnevem662@gmail.com> | 2022-12-05 00:17:18 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-12-05 00:17:18 +0100 |
commit | d42cec62dbfdcd4058ba878e5a43d9bb4205070f (patch) | |
tree | f9a13949a2a7d3086e25c3bf926654b1631aeb2b /src/ips | |
parent | ae3bbcae299983eac514fa803d46e65058cbee39 (diff) | |
download | chawan-d42cec62dbfdcd4058ba878e5a43d9bb4205070f.tar.gz |
sigh
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 ff2d189e..5c3ad622 100644 --- a/src/ips/socketstream.nim +++ b/src/ips/socketstream.nim @@ -43,7 +43,8 @@ proc sendFileHandle*(s: SocketStream, fd: FileHandle) = hdr.msg_iov = addr iov hdr.msg_iovlen = 1 hdr.msg_control = cmsgbuf - hdr.msg_controllen = CMSG_LEN(csize_t(sizeof(FileHandle))) + # ...this is stupid. + cast[ptr uint16](hdr.msg_controllen)[] = cast[ptr uint16](CMSG_LEN(csize_t(sizeof(FileHandle))))[] let cmsg = CMSG_FIRSTHDR(addr hdr) cmsg.cmsg_len = CMSG_LEN(csize_t(sizeof(FileHandle))) cmsg.cmsg_level = SOL_SOCKET |