From 039cc4809e32aff8798050fa0562e2dbe22b2951 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Apr 2019 17:02:29 +0200 Subject: [PATCH] buffer.hpp: fix build on uclibc malloc_usable_size is not available on uclibc Signed-off-by: Fabrice Fontaine --- include/libtorrent/buffer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libtorrent/buffer.hpp b/include/libtorrent/buffer.hpp index 3af5ef24f..785e7cfd8 100644 --- a/include/libtorrent/buffer.hpp +++ b/include/libtorrent/buffer.hpp @@ -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(::malloc_usable_size(m_begin)); #elif defined _MSC_VER m_size = static_cast(::_msize(m_begin));