Fix SDL2 builds

This commit is contained in:
Cacodemon345
2024-03-12 19:41:12 +06:00
parent dbd875285f
commit 097c9b4169
2 changed files with 5 additions and 3 deletions

View File

@@ -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)

View File

@@ -22,14 +22,16 @@
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <unistd.h>
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;