From 12985c8b31aa2ffd69c1459396ace0298e98cb53 Mon Sep 17 00:00:00 2001 From: Daniel Svensson Date: Fri, 30 Aug 2024 21:05:06 +0200 Subject: [PATCH] Compilation fixes (#267) * Fix q3 plugin compilation on aarch64 macOS. * Fix duplicate symbol when statically linking ezhud. --- plugins/ezhud/ezquakeisms.c | 4 ++-- plugins/ezhud/ezquakeisms.h | 7 +++++++ plugins/quake3/botlib/q_platform.h | 3 +++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/ezhud/ezquakeisms.c b/plugins/ezhud/ezquakeisms.c index ecb04da19..d86ba3982 100644 --- a/plugins/ezhud/ezquakeisms.c +++ b/plugins/ezhud/ezquakeisms.c @@ -4,12 +4,12 @@ #ifdef FTEENGINE #define Plug_Init Plug_EZHud_Init -#else +#endif + plug2dfuncs_t *drawfuncs; plugclientfuncs_t *clientfuncs; plugfsfuncs_t *filefuncs; pluginputfuncs_t *inputfuncs; -#endif struct ezcl_s cl; struct ezcls_s cls; diff --git a/plugins/ezhud/ezquakeisms.h b/plugins/ezhud/ezquakeisms.h index a1fa1ddcc..ede608973 100644 --- a/plugins/ezhud/ezquakeisms.h +++ b/plugins/ezhud/ezquakeisms.h @@ -8,6 +8,13 @@ #include #include +#ifdef FTEENGINE +#define drawfuncs ezhud_drawfuncs +#define filefuncs ezhud_filefuncs +#define clientfuncs ezhud_clientfuncs +#define inputfuncs ezhud_inputfuncs +#endif + extern plug2dfuncs_t *drawfuncs; extern plugfsfuncs_t *filefuncs; extern plugclientfuncs_t *clientfuncs; diff --git a/plugins/quake3/botlib/q_platform.h b/plugins/quake3/botlib/q_platform.h index f1f35c8fc..365098435 100644 --- a/plugins/quake3/botlib/q_platform.h +++ b/plugins/quake3/botlib/q_platform.h @@ -155,6 +155,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define idx64 1 #define ARCH_STRING "x86_64" #define Q3_LITTLE_ENDIAN +#elif defined __aarch64__ +#define ARCH_STRING "aarch64" +#define Q3_LITTLE_ENDIAN #endif #define DLL_EXT ".dylib"