File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141#include <math.h>
4242#if defined(__APPLE__)
4343#include <malloc/malloc.h>
44- #elif defined(__linux__) || defined(__GLIBC__)
44+ #elif defined(__linux__) || defined(__GLIBC__) || defined(__ANDROID__)
4545#include <malloc.h>
4646#elif defined(__FreeBSD__)
4747#include <malloc_np.h>
@@ -1754,9 +1754,9 @@ static size_t js_def_malloc_usable_size(const void *ptr)
17541754 return malloc_size(ptr);
17551755#elif defined(_WIN32)
17561756 return _msize((void *)ptr);
1757- #elif defined(EMSCRIPTEN)
1757+ #elif defined(EMSCRIPTEN) || defined(__OpenBSD__) || defined(__NetBSD__)
17581758 return 0;
1759- #elif defined(__linux__) || defined(__GLIBC__)
1759+ #elif defined(__linux__) || defined(__ANDROID__) || defined(__FreeBSD__) || defined( __GLIBC__)
17601760 return malloc_usable_size((void *)ptr);
17611761#else
17621762 /* change this to `return 0;` if compilation fails */
You can’t perform that action at this time.
0 commit comments