Skip to content

Commit

Permalink
link to older glibc
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqst committed Jan 23, 2023
1 parent 8c2e9bf commit d85e0fa
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ascurl/meta_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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..
Expand Down
2 changes: 2 additions & 0 deletions asext/meta_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions asqcvar/meta_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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..
Expand Down
2 changes: 2 additions & 0 deletions asusermsg/meta_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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..
Expand Down
2 changes: 2 additions & 0 deletions fallguys/meta_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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..
Expand Down
2 changes: 1 addition & 1 deletion metamod/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions metamod/metamod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 12 additions & 0 deletions metamod/mutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d85e0fa

Please sign in to comment.