From 41aebdf8e8df050ac89c12ec4588fd6c95fecd64 Mon Sep 17 00:00:00 2001 From: kotofyt Date: Fri, 9 Jan 2026 18:27:46 +0200 Subject: [PATCH] platform abi --- tier0/platform.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tier0/platform.cpp b/tier0/platform.cpp index 19e39cc..d70b799 100644 --- a/tier0/platform.cpp +++ b/tier0/platform.cpp @@ -9,8 +9,10 @@ #ifdef __linux__ #include "dlfcn.h" +#ifdef __GLIBC__ #include "execinfo.h" #endif +#endif #ifdef __APPLE__ #include "dlfcn.h" #endif @@ -119,12 +121,16 @@ PLATFORM_INTERFACE char *Plat_GetExtension( const char *szPath ) } PLATFORM_INTERFACE void Plat_MakeDir( const char *szPath, int iPermissions ) { +#ifndef ACCESSPERMS +#define ACCESSPERMS 0777 +#endif mkdir(szPath, ACCESSPERMS); } PLATFORM_INTERFACE void Plat_Backtrace( void ) { #ifdef __linux__ +#ifdef __GLIBC__ void *buffer[64]; int nptrs = backtrace(buffer, 64); char **symbols = backtrace_symbols(buffer, nptrs); @@ -140,6 +146,7 @@ PLATFORM_INTERFACE void Plat_Backtrace( void ) free(symbols); #endif +#endif #ifdef __WIN32__ /* void* buffer[64];