--- ./flutter/third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc +++ ./flutter/third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc.orig @@ -86,11 +86,11 @@ } size_t Process::GetMallocUsage() { -#if defined(HAVE_MALLINFO2) +#if defined(HAVE_MALLINFO2) && defined(__GLIBC__) struct mallinfo2 mi; mi = ::mallinfo2(); return mi.uordblks; -#elif defined(HAVE_MALLINFO) +#elif defined(HAVE_MALLINFO) && defined(__GLIBC__) struct mallinfo mi; mi = ::mallinfo(); return mi.uordblks; --- ./flutter/third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h.orig 2019-09-30 13:03:42.556880537 -0400 +++ ./flutter/third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h 2019-09-30 13:07:27.989821227 -0400 @@ -122,7 +122,9 @@ /* #undef HAVE_MALLCTL */ /* Define to 1 if you have the `mallinfo' function. */ +#if defined(__GLIBC__) #define HAVE_MALLINFO 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_MALLOC_H 1