From c67c0789ebd02d40ff5728a1d9d70cef04c6ad43 Mon Sep 17 00:00:00 2001 From: Carwyn Nelson Date: Wed, 10 Nov 2021 15:55:50 +0000 Subject: [PATCH] Add socket() function to windows ws32 bindings It looks like this was missing from the winsock bindings. Odin contains WSASocketW which I assume would also work for obtaining a socket, but socket() is distinct and is what I was using, so I assume others will want it too. --- core/sys/windows/ws2_32.odin | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/sys/windows/ws2_32.odin b/core/sys/windows/ws2_32.odin index cd467e142..0cff5c2da 100644 --- a/core/sys/windows/ws2_32.odin +++ b/core/sys/windows/ws2_32.odin @@ -39,6 +39,11 @@ foreign ws2_32 { g: GROUP, dwFlags: DWORD, ) -> SOCKET --- + socket :: proc( + af: c_int, + type: c_int, + protocol: c_int, + ) -> SOCKET --- ioctlsocket :: proc(s: SOCKET, cmd: c_long, argp: ^c_ulong) -> c_int --- closesocket :: proc(socket: SOCKET) -> c_int ---