about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-04-02 16:44:43 +0200
committerbptato <nincsnevem662@gmail.com>2024-04-02 16:44:43 +0200
commita79a72ddbb34574f973ae51fa34a81b999073699 (patch)
treed39247f9ad31f8cb668f255b251d49ced0f9d9c7
parent24bfedd82bafc3de88c8434fb2eacc4b7d8bb4e7 (diff)
downloadchawan-a79a72ddbb34574f973ae51fa34a81b999073699.tar.gz
quickjs: fix OpenBSD compilation
it seems OpenBSD has no malloc_usable_size
-rw-r--r--lib/quickjs/quickjs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/quickjs/quickjs.c b/lib/quickjs/quickjs.c
index a3f59443..3a8bee53 100644
--- a/lib/quickjs/quickjs.c
+++ b/lib/quickjs/quickjs.c
@@ -1702,7 +1702,7 @@ static size_t js_def_malloc_usable_size(const void *ptr)
     return malloc_size(ptr);
 #elif defined(_WIN32)
     return _msize((void *)ptr);
-#elif defined(EMSCRIPTEN)
+#elif defined(EMSCRIPTEN) || defined(__OpenBSD__)
     return 0;
 #elif defined(__linux__)
     return malloc_usable_size((void *)ptr);