Skip to content

Commit

Permalink
internal/socket: replace deprecated syscall.Syscall9
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Apr 8, 2023
1 parent 7249942 commit d88b00b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions internal/socket/socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d88b00b

Please sign in to comment.