From f0cf1052d04d890ef9692c5b289794355abb6a01 Mon Sep 17 00:00:00 2001 From: Feoramund <161657516+Feoramund@users.noreply.github.com> Date: Sun, 30 Jun 2024 10:17:32 -0400 Subject: [PATCH] Fix FreeBSD `recvfrom` `fromlen` must be a pointer, not a value. --- core/sys/freebsd/syscalls.odin | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/sys/freebsd/syscalls.odin b/core/sys/freebsd/syscalls.odin index 7aebde8a7..581b08253 100644 --- a/core/sys/freebsd/syscalls.odin +++ b/core/sys/freebsd/syscalls.odin @@ -79,7 +79,10 @@ where cast(uintptr)len(buf), cast(uintptr)flags, cast(uintptr)from, - cast(uintptr)fromlen) + cast(uintptr)&fromlen) + + // `from.len` will be modified by the syscall, so we shouldn't need to pass + // `fromlen` back from this API. if !ok { return 0, cast(Errno)result