move syscall constants for networking into net space to avoid windows build issue

This commit is contained in:
Scott Feldman
2023-05-02 16:39:11 -07:00
committed by deadprogram
parent d939a800a7
commit 2d46776c18
4 changed files with 17 additions and 10 deletions
+1 -2
View File
@@ -12,7 +12,6 @@ import (
"io"
"net/netip"
"strconv"
"syscall"
"time"
)
@@ -169,7 +168,7 @@ func DialUDP(network string, laddr, raddr *UDPAddr) (*UDPConn, error) {
laddr.Port = ephemeralPort()
}
fd, err := netdev.Socket(syscall.AF_INET, syscall.SOCK_DGRAM, syscall.IPPROTO_UDP)
fd, err := netdev.Socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)
if err != nil {
return nil, err
}