buffer.hpp: fix build on uclibc

malloc_usable_size is not available on uclibc

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This commit is contained in:
Fabrice Fontaine 2019-04-20 17:02:29 +02:00 committed by Arvid Norberg
parent 76c2794923
commit 039cc4809e
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ public:
// the actual allocation may be larger than we requested. If so, let the
// user take advantage of every single byte
#if defined __GLIBC__ || defined __FreeBSD__
#if (defined __GLIBC__ && !defined __UCLIBC__) || defined __FreeBSD__
m_size = static_cast<difference_type>(::malloc_usable_size(m_begin));
#elif defined _MSC_VER
m_size = static_cast<difference_type>(::_msize(m_begin));