fix build and run on OpenBSD (#6050)

This commit is contained in:
Fabien Romano
2026-01-15 21:46:03 +01:00
committed by GitHub
parent a92f07e1f1
commit c43139ebd6
3 changed files with 3 additions and 3 deletions

View File

@@ -60,7 +60,7 @@ u32 Locale_IsRegionNative(void);
void _assert(const char* exp, const char* file, s32 line); void _assert(const char* exp, const char* file, s32 line);
#elif defined(__linux__) #elif defined(__linux__)
void __assert(const char* exp, const char* file, s32 line) __THROW; void __assert(const char* exp, const char* file, s32 line) __THROW;
#elif !defined(__APPLE__) && !defined(__SWITCH__) #elif !defined(__APPLE__) && !defined(__SWITCH__) && !defined(__OpenBSD__)
void __assert(const char* exp, const char* file, s32 line); void __assert(const char* exp, const char* file, s32 line);
#endif #endif
#if defined(__APPLE__) && defined(NDEBUG) #if defined(__APPLE__) && defined(NDEBUG)

View File

@@ -45,7 +45,7 @@ extern "C" void gSPSegment(void* value, int segNum, uintptr_t target) {
if (res) { if (res) {
uintptr_t desiredTarget = (uintptr_t)ResourceMgr_LoadIfDListByName(imgData); uintptr_t desiredTarget = (uintptr_t)ResourceMgr_LoadIfDListByName(imgData);
if (desiredTarget != NULL) if (desiredTarget)
target = desiredTarget; target = desiredTarget;
} }

View File

@@ -1,6 +1,6 @@
#include "z64.h" #include "z64.h"
#include <assert.h> #include <assert.h>
#ifndef __APPLE__ #if !defined(__APPLE__) && !defined(__OpenBSD__)
#include <malloc.h> #include <malloc.h>
#endif #endif
#include <stdlib.h> #include <stdlib.h>