$OpenBSD$

use base swap16, swap32 functions
use 0 for malloc_usable_size (see lang/quickjs/patches/patch-qjs_c)
return 0 where ::malloc_usable_size is invoked

Index: src/Texture2DDecoder/unitycrunch/crn_decomp.h
--- src/Texture2DDecoder/unitycrunch/crn_decomp.h.orig
+++ src/Texture2DDecoder/unitycrunch/crn_decomp.h
@@ -33,6 +33,9 @@ using namespace std; 
 #if defined(__APPLE__)
 #include <malloc/malloc.h>
 #define malloc_usable_size malloc_size
+#elif defined(__OpenBSD__)
+#include <sys/malloc.h>
+#define malloc_usable_size(x) 0
 #else
 #include <malloc.h>
 #ifdef _WIN32
@@ -484,12 +487,14 @@ inline void invert_buf(void* pBuf, uint32 size) {
     swap(p[i], p[size - 1U - i]);
 }
 
+/*
 static inline uint16 swap16(uint16 x) {
   return static_cast<uint16>((x << 8) | (x >> 8));
 }
 static inline uint32 swap32(uint32 x) {
   return ((x << 24) | ((x << 8) & 0x00FF0000) | ((x >> 8) & 0x0000FF00) | (x >> 24));
 }
+*/
 
 uint32 compute_max_mips(uint32 width, uint32 height);
 
@@ -1971,6 +1976,8 @@ static void* crnd_default_realloc(void* p, size_t size
     if (pActual_size) {
 #ifdef _WIN32
       *pActual_size = ::_msize(p_final_block);
+#elif defined(__OpenBSD__)
+      *pActual_size = 0;
 #else
       *pActual_size = ::malloc_usable_size(p_final_block);
 #endif
