diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2024-02-11 18:17:33 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2024-02-11 18:17:33 +0100 |
commit | df00df5a7a5bcd9076d4423128ea014ab3535626 (patch) | |
tree | 337e62f8ca39b19b250b155a3fbeb495384e356b /source/kit/sockets.h | |
parent | 80da54bb97c279aa60fb77a9bbad9baa0f2e4477 (diff) | |
download | saw-df00df5a7a5bcd9076d4423128ea014ab3535626.zip |
Update kit
Diffstat (limited to 'source/kit/sockets.h')
-rw-r--r-- | source/kit/sockets.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/kit/sockets.h b/source/kit/sockets.h index a9e2754..276ecc5 100644 --- a/source/kit/sockets.h +++ b/source/kit/sockets.h @@ -1,6 +1,7 @@ #ifndef KIT_SOCKETS_H #define KIT_SOCKETS_H +#include "types.h" #include "status.h" #ifndef KIT_DISABLE_SYSTEM_SOCKETS @@ -23,7 +24,7 @@ extern "C" { # define socket_t SOCKET # define socklen_t i32 -static kit_status_t kit_sockets_init(void) { +static s32 kit_sockets_init(void) { WSADATA data; memset(&data, 0, sizeof data); WORD version = MAKEWORD(2, 2); @@ -32,7 +33,7 @@ static kit_status_t kit_sockets_init(void) { : KIT_ERROR_SOCKETS_STARTUP_FAILED; } -static kit_status_t kit_sockets_cleanup(void) { +static s32 kit_sockets_cleanup(void) { WSACleanup(); return KIT_OK; } @@ -69,12 +70,12 @@ static i32 kit_socket_set_nonblocking(socket_t s) { # define closesocket close # define INVALID_SOCKET -1 -static kit_status_t kit_sockets_init(void) { +static s32 kit_sockets_init(void) { signal(SIGPIPE, SIG_IGN); return KIT_OK; } -static kit_status_t kit_sockets_cleanup(void) { +static s32 kit_sockets_cleanup(void) { return KIT_OK; } |