mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:57:35 +00:00
Ports: Add quake3 port :^)
This commit is contained in:
parent
c08dfe063a
commit
e2f1da8cec
11 changed files with 571 additions and 0 deletions
|
@ -0,0 +1,79 @@
|
|||
From c7106223c30a896a576c44ce735d4772c283afac Mon Sep 17 00:00:00 2001
|
||||
From: Jesse Buhagiar <jooster669@gmail.com>
|
||||
Date: Fri, 25 Mar 2022 09:40:41 +1100
|
||||
Subject: [PATCH 3/8] Engine: Add `<sys/select.h>` include for Serenity
|
||||
|
||||
QuakeIII makes extensive use of the `select()` syscall for its' netcode.
|
||||
It seems that Linux has this in a header that isn't `<sys/select.h>`
|
||||
like us, which results in an implicit declaration error.
|
||||
---
|
||||
code/qcommon/net_ip.c | 7 +++++++
|
||||
code/sys/con_tty.c | 4 ++++
|
||||
code/sys/sys_unix.c | 4 ++++
|
||||
3 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c
|
||||
index bcccda20..ea940f59 100644
|
||||
--- a/code/qcommon/net_ip.c
|
||||
+++ b/code/qcommon/net_ip.c
|
||||
@@ -81,6 +81,10 @@ static qboolean winsockInitialized = qfalse;
|
||||
# include <sys/filio.h>
|
||||
# endif
|
||||
|
||||
+#ifdef __serenity__
|
||||
+#include <sys/select.h>
|
||||
+#endif
|
||||
+
|
||||
typedef int SOCKET;
|
||||
# define INVALID_SOCKET -1
|
||||
# define SOCKET_ERROR -1
|
||||
@@ -996,6 +1000,7 @@ NET_JoinMulticast
|
||||
Join an ipv6 multicast group
|
||||
====================
|
||||
*/
|
||||
+#ifndef __serenity__
|
||||
void NET_JoinMulticast6(void)
|
||||
{
|
||||
int err;
|
||||
@@ -1059,6 +1064,8 @@ void NET_LeaveMulticast6()
|
||||
}
|
||||
}
|
||||
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
====================
|
||||
NET_OpenSocks
|
||||
diff --git a/code/sys/con_tty.c b/code/sys/con_tty.c
|
||||
index 58f178ad..74e1c60d 100644
|
||||
--- a/code/sys/con_tty.c
|
||||
+++ b/code/sys/con_tty.c
|
||||
@@ -34,6 +34,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#include <fcntl.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
+#ifdef __serenity__
|
||||
+#include <sys/select.h>
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
=============================================================
|
||||
tty console routines
|
||||
diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c
|
||||
index e0c63238..05f311bb 100644
|
||||
--- a/code/sys/sys_unix.c
|
||||
+++ b/code/sys/sys_unix.c
|
||||
@@ -39,6 +39,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#include <fenv.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
+#ifdef __serenity__
|
||||
+#include <sys/select.h>
|
||||
+#endif
|
||||
+
|
||||
qboolean stdinIsATTY;
|
||||
|
||||
// Used to determine where to store user-specific files
|
||||
--
|
||||
2.35.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue