From 097c9b4169427e3c24fae928ccf791fda1a24f8d Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 12 Mar 2024 19:41:12 +0600 Subject: [PATCH] Fix SDL2 builds --- src/unix/CMakeLists.txt | 2 +- src/unix/unix_netsocket.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/unix/CMakeLists.txt b/src/unix/CMakeLists.txt index 43c730315..aa4cc84e2 100644 --- a/src/unix/CMakeLists.txt +++ b/src/unix/CMakeLists.txt @@ -17,7 +17,7 @@ # Copyright 2021-2022 Jasmine Iwanek. # -add_library(plat OBJECT unix.c unix_serial_passthrough.c) +add_library(plat OBJECT unix.c unix_serial_passthrough.c unix_netsocket.c) if (NOT CPPTHREADS) target_sources(plat PRIVATE unix_thread.c) diff --git a/src/unix/unix_netsocket.c b/src/unix/unix_netsocket.c index e0353a463..76ae0831b 100644 --- a/src/unix/unix_netsocket.c +++ b/src/unix/unix_netsocket.c @@ -22,14 +22,16 @@ #include #include #include +#include #include #include +#include #include SOCKET plat_netsocket_create(int type) { SOCKET fd = -1; - u_long yes = 1; + int yes = 1; if (type != NET_SOCKET_TCP) return -1; @@ -47,7 +49,7 @@ SOCKET plat_netsocket_create_server(int type, unsigned short port) { struct sockaddr_in sock_addr; SOCKET fd = -1; - u_long yes = 1; + int yes = 1; if (type != NET_SOCKET_TCP) return -1;