From 7f7819969de61be4400796bbffe172d131c2a2e7 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 8 Apr 2023 16:56:28 +0200 Subject: [PATCH] internal/socket: replace deprecated syscall.Syscall9 Signed-off-by: Sebastiaan van Stijn --- internal/socket/socket.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/socket/socket.go b/internal/socket/socket.go index 39e8c05f..18e4d73c 100644 --- a/internal/socket/socket.go +++ b/internal/socket/socket.go @@ -156,18 +156,14 @@ func connectEx( bytesSent *uint32, overlapped *windows.Overlapped, ) (err error) { - // todo: after upgrading to 1.18, switch from syscall.Syscall9 to syscall.SyscallN - r1, _, e1 := syscall.Syscall9(connectExFunc.addr, - 7, + r1, _, e1 := syscall.SyscallN(connectExFunc.addr, uintptr(s), uintptr(name), uintptr(namelen), uintptr(unsafe.Pointer(sendBuf)), uintptr(sendDataLen), uintptr(unsafe.Pointer(bytesSent)), - uintptr(unsafe.Pointer(overlapped)), - 0, - 0) + uintptr(unsafe.Pointer(overlapped))) if r1 == 0 { if e1 != 0 { err = error(e1)