hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit b721b5d4632c379bd5886f9ea992e3e4c471cd23
parent 6d4db68d30447032f5c70a4c26f48bd34de17b09
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Wed,  1 Sep 2021 07:22:09 +0000

net::unix: fix addrlen

Signed-off-by: Eyal Sawady <ecs@d2evs.net>

Diffstat:
Mnet/unix/+linux.ha | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/unix/+linux.ha b/net/unix/+linux.ha @@ -21,7 +21,7 @@ export fn connect(addr: addr) (*io::stream | net::error) = { let flags = rt::fcntl(sockfd, rt::F_GETFL, 0)!; rt::fcntl(sockfd, rt::F_SETFL, flags | rt::O_CLOEXEC)!; - const sz = size(rt::sockaddr): u32; + const sz = size(rt::sockaddr_un): u32; match (rt::connect(sockfd, &sockaddr, sz)) { err: rt::errno => return errors::errno(err), int => void, @@ -54,7 +54,7 @@ export fn listen( bk = options[i]; }; - match (rt::bind(sockfd, &sockaddr, size(rt::sockaddr): u32)) { + match (rt::bind(sockfd, &sockaddr, size(rt::sockaddr_un): u32)) { err: rt::errno => return errors::errno(err), int => void, };