Created
July 23, 2025 23:04
-
-
Save gottaeat/ff866df5ff5881b7ffc56bc523d1801d to your computer and use it in GitHub Desktop.
Apple Silicon Mac Quakespasm-spiked fixes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/Quake/ice/ice_mdns.c b/Quake/ice/ice_mdns.c | |
| index 3c7161e..7d3dd49 100644 | |
| --- a/Quake/ice/ice_mdns.c | |
| +++ b/Quake/ice/ice_mdns.c | |
| @@ -318,7 +318,7 @@ qboolean MDNS_Setup(struct icemodule_s *module) | |
| mbrship.imr_multiaddr.s_addr = inet_addr("224.0.0.251"); //or FF02::FB | |
| //browsers don't seem to let us take the easy route, so we can't just use our existing helpers. | |
| - mdns_socket = socket (PF_INET, SOCK_CLOEXEC|SOCK_DGRAM, IPPROTO_UDP); | |
| + mdns_socket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP); | |
| if (mdns_socket == INVALID_SOCKET) success = false; | |
| if (!success || 0 > ioctlsocket(mdns_socket, FIONBIO, (void*)&_true)) success = false; | |
| //other processes on the same host may be listening for mdns packets to insert their own responses (eg two browsers), so we need to ensure that other processes can use the same port. there's no real security here for us (that comes from stun's user/pass stuff). | |
| diff --git a/Quake/ice/ice_socket.c b/Quake/ice/ice_socket.c | |
| index 2f96df1..77e92ad 100644 | |
| --- a/Quake/ice/ice_socket.c | |
| +++ b/Quake/ice/ice_socket.c | |
| @@ -681,7 +681,7 @@ struct icesocket_s *ICE_OpenUDP(netadrtype_t type, int port) | |
| n->EnumerateAddresses = ICEUDP_GetAddresses; | |
| n->CloseSocket = ICEUDP_Close; | |
| n->af = adr.sa.sa_family; | |
| - n->sock = socket(n->af, SOCK_CLOEXEC|SOCK_DGRAM, IPPROTO_UDP); | |
| + n->sock = socket(n->af, SOCK_DGRAM, IPPROTO_UDP); | |
| if (n->sock != INVALID_SOCKET) | |
| { | |
| #ifdef _WIN32 | |
| @@ -759,7 +759,7 @@ static struct icesocket_s *ICE_OpenTCPSocket(netadrtype_t type, int port) | |
| n->EnumerateAddresses = ICEUDP_GetAddresses; | |
| n->CloseSocket = ICEUDP_Close; | |
| n->af = adr.sa.sa_family; | |
| - n->sock = socket(n->af, SOCK_CLOEXEC|SOCK_STREAM, IPPROTO_TCP); | |
| + n->sock = socket(n->af, SOCK_STREAM, IPPROTO_TCP); | |
| if (n->sock != INVALID_SOCKET) | |
| { | |
| #ifdef _WIN32 | |
| diff --git a/Quake/ice/ice_stream.c b/Quake/ice/ice_stream.c | |
| index 3172690..1bc1be6 100644 | |
| --- a/Quake/ice/ice_stream.c | |
| +++ b/Quake/ice/ice_stream.c | |
| @@ -319,7 +319,7 @@ SOCKET TCP_OpenStream(netadr_t *addr, const char *remotename, qboolean nonagle) | |
| break; | |
| } | |
| - if ((newsocket = socket (addr->sa.sa_family, SOCK_CLOEXEC|SOCK_STREAM, sysprot)) == INVALID_SOCKET) | |
| + if ((newsocket = socket (addr->sa.sa_family, SOCK_STREAM, sysprot)) == INVALID_SOCKET) | |
| return (int)INVALID_SOCKET; | |
| setsockopt(newsocket, SOL_SOCKET, SO_RCVBUF, (void*)&recvbufsize, sizeof(recvbufsize)); | |
| diff --git a/Quake/main_sdl.c b/Quake/main_sdl.c | |
| index 9101a54..0e642a2 100644 | |
| --- a/Quake/main_sdl.c | |
| +++ b/Quake/main_sdl.c | |
| @@ -62,9 +62,9 @@ static quakeparms_t parms; | |
| // On OS X we call SDL_main from the launcher, but SDL2 doesn't redefine main | |
| // as SDL_main on OS X anymore, so we do it ourselves. | |
| -#if defined(USE_SDL2) && defined(__APPLE__) | |
| -#define main SDL_main | |
| -#endif | |
| +//#if defined(USE_SDL2) && defined(__APPLE__) | |
| +//#define main SDL_main | |
| +//#endif | |
| int main(int argc, char *argv[]) | |
| { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment