diff options
author | smcgruer <smcgruer@google.com> | 2015-03-16 14:45:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-16 14:45:01 -0700 |
commit | b83205a538f420fd78220519540503616cf636cd (patch) | |
tree | 1a650526823b328a6d9fdb593e58d9aa604fe249 /src/core | |
parent | 6f7f2012eed634695dc76aad720d3ee0820bd9d2 (diff) |
Fix build for UCLIBC platforms
malloc_usable_size does not exist in UCLIBC, so fall back to just
returning 0 for SkVarAlloc::heap_size().
BUG=skia:
Review URL: https://codereview.chromium.org/1006073003
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkVarAlloc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkVarAlloc.cpp b/src/core/SkVarAlloc.cpp index ba5d6f50b0..88bd17028f 100644 --- a/src/core/SkVarAlloc.cpp +++ b/src/core/SkVarAlloc.cpp @@ -47,7 +47,7 @@ void SkVarAlloc::makeSpace(size_t bytes, unsigned flags) { #if defined(SK_BUILD_FOR_MAC) SkASSERT(alloc == malloc_good_size(alloc)); -#elif defined(SK_BUILD_FOR_UNIX) +#elif defined(SK_BUILD_FOR_UNIX) && !defined(__UCLIBC__) // TODO(mtklein): tune so we can assert something like this //SkASSERT(alloc == malloc_usable_size(fBlock)); #endif @@ -56,7 +56,7 @@ void SkVarAlloc::makeSpace(size_t bytes, unsigned flags) { static size_t heap_size(void* p) { #if defined(SK_BUILD_FOR_MAC) return malloc_size(p); -#elif defined(SK_BUILD_FOR_UNIX) +#elif defined(SK_BUILD_FOR_UNIX) && !defined(__UCLIBC__) return malloc_usable_size(p); #elif defined(SK_BUILD_FOR_WIN32) return _msize(p); |