Another fix for iOS build

This commit is contained in:
Wojtek Figat
2025-05-25 18:01:30 +02:00
parent 8f9fa6995e
commit a74c5e7943
2 changed files with 24 additions and 5 deletions

View File

@@ -2,8 +2,12 @@
#if PLATFORM_MAC || PLATFORM_IOS
#define PLATFORM_MAC_CACHED PLATFORM_MAC
#define PLATFORM_IOS_CACHED PLATFORM_IOS
#if PLATFORM_MAC
#define PLATFORM_MAC_CACHED 1
#endif
#if PLATFORM_IOS
#define PLATFORM_IOS_CACHED 1
#endif
#include "ApplePlatform.h"
#include "AppleUtils.h"
@@ -54,8 +58,23 @@
#endif
// System includes break those defines
#define PLATFORM_MAC PLATFORM_MAC_CACHED
#define PLATFORM_IOS PLATFORM_IOS_CACHED
#undef PLATFORM_MAC
#if PLATFORM_MAC_CACHED
#define PLATFORM_MAC 1
#else
#define PLATFORM_MAC 0
#endif
#undef PLATFORM_IOS
#if PLATFORM_IOS_CACHED
#define PLATFORM_IOS 1
#else
#define PLATFORM_IOS 0
#endif
#if PLATFORM_IOS
#include <sys/resource.h>
extern "C" int proc_pid_rusage(int pid, int flavor, rusage_info_t *buffer) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
#endif
CPUInfo Cpu;
String UserLocale;

View File

@@ -2272,7 +2272,7 @@ void ShutdownHostfxr()
#endif
}
void* GetStaticMethodPointer(const String& methodName)
void* GetStaticMethodPointer(StringView methodName)
{
void* fun;
if (CachedFunctions.TryGet(methodName, fun))