diff --git a/ascurl/meta_api.cpp b/ascurl/meta_api.cpp index 036587d..b9bfdab 100644 --- a/ascurl/meta_api.cpp +++ b/ascurl/meta_api.cpp @@ -48,6 +48,8 @@ #include "serverdef.h" #include "ascurl.h" +LINK_TO_OLDER_GLIBC(); + IMPORT_ASEXT_API_DEFINE(); // Must provide at least one of these.. diff --git a/asext/meta_api.cpp b/asext/meta_api.cpp index d5e4b06..c941e13 100644 --- a/asext/meta_api.cpp +++ b/asext/meta_api.cpp @@ -48,6 +48,8 @@ #include "serverdef.h" +LINK_TO_OLDER_GLIBC(); + hook_t *g_phook_CASDocumentation_RegisterObjectType = NULL; hook_t *g_phook_CASDirectoryList_CreateDirectory = NULL; diff --git a/asqcvar/meta_api.cpp b/asqcvar/meta_api.cpp index a66b8af..66a431f 100644 --- a/asqcvar/meta_api.cpp +++ b/asqcvar/meta_api.cpp @@ -48,6 +48,8 @@ #include "serverdef.h" #include "asqcvar.h" +LINK_TO_OLDER_GLIBC(); + IMPORT_ASEXT_API_DEFINE(); // Must provide at least one of these.. diff --git a/asusermsg/meta_api.cpp b/asusermsg/meta_api.cpp index 669fbc0..4f0ce21 100644 --- a/asusermsg/meta_api.cpp +++ b/asusermsg/meta_api.cpp @@ -48,6 +48,8 @@ #include "serverdef.h" #include "asusermsg.h" +LINK_TO_OLDER_GLIBC(); + IMPORT_ASEXT_API_DEFINE(); // Must provide at least one of these.. diff --git a/fallguys/meta_api.cpp b/fallguys/meta_api.cpp index d1dfcc3..0d6f70c 100644 --- a/fallguys/meta_api.cpp +++ b/fallguys/meta_api.cpp @@ -49,6 +49,8 @@ #include "fallguys.h" #include "physics.h" +LINK_TO_OLDER_GLIBC(); + IMPORT_ASEXT_API_DEFINE(); // Must provide at least one of these.. diff --git a/metamod/Makefile b/metamod/Makefile index 66de2f6..bd2ee37 100644 --- a/metamod/Makefile +++ b/metamod/Makefile @@ -190,7 +190,7 @@ SRCDIR=. INCLUDEDIRS+=-I$(SRCDIR) -I$(METADIR) -I$(SDKSRC)/engine -I$(SDKSRC)/common -I$(SDKSRC)/pm_shared -I$(SDKSRC)/dlls -I$(SDKSRC) FILES_ALL = *.cpp *.h [A-Z]* *.rc -CFLAGS=-Wall -Wno-unknown-pragmas -Wno-attributes -Wno-write-strings +CFLAGS=-Wall -Wno-unknown-pragmas -Wno-attributes -Wno-write-strings -Wno-fstack-protector #CFLAGS+=-std=gnu++98 -Wno-c++11-compat CFLAGS+=-std=gnu++14 diff --git a/metamod/metamod.cpp b/metamod/metamod.cpp index c5eda54..1c74639 100644 --- a/metamod/metamod.cpp +++ b/metamod/metamod.cpp @@ -57,6 +57,8 @@ #include "vdate.h" // COMPILE_TIME, etc #include "linkent.h" +LINK_TO_OLDER_GLIBC(); + cvar_t meta_version = {"metamod_version", VVERSION, FCVAR_SERVER, 0, NULL}; MConfig static_config; diff --git a/metamod/mutil.h b/metamod/mutil.h index 54ef99b..d8f9dc4 100644 --- a/metamod/mutil.h +++ b/metamod/mutil.h @@ -42,6 +42,18 @@ #include "mhook.h" // game_event_t, etc #include "sdk_util.h" // hudtextparms_t, etc +#ifdef PLATFORM_POSIX + +#define LINK_TO_OLDER_GLIBC() +__asm__(".symver dlopen,dlopen@GLIBC_2.1");\ +__asm__(".symver dlclose,dlclose@GLIBC_2.1");\ +__asm__(".symver dlsym,dlsym@GLIBC_2.1"); +#else + +#define LINK_TO_OLDER_GLIBC() + +#endif + // max buffer size for printed messages #define MAX_LOGMSG_LEN 1024