[Buildroot] [PATCH-2018.02.x] mosquitto: fix build on uClibc

Peter Korsgaard peter at korsgaard.com
Mon Nov 26 08:25:34 UTC 2018


Fixes:
http://autobuild.buildroot.net/results/c42/c425eb496cc5422ff1e2e51e59d4baf377bcbeed/

The memory tracking feature of mosquitto (which is enabled by default on
systems defining __GLIBC__) uses malloc_usable_size() which was only added
to uClibc-ng in 1.0.29.

2018.02.x still uses 1.0.28, so disable this feature when building on
uClibc.

Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/mosquitto/mosquitto.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk
index fcce0535cb..d01811e5aa 100644
--- a/package/mosquitto/mosquitto.mk
+++ b/package/mosquitto/mosquitto.mk
@@ -17,6 +17,13 @@ MOSQUITTO_MAKE_OPTS = \
 	WITH_WRAP=no \
 	WITH_DOCS=no
 
+# uses malloc_usable_size which was only added in uClibc-ng 1.0.29
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+MOSQUITTO_MAKE_OPTS += WITH_MEMORY_TRACKING=no
+else
+MOSQUITTO_MAKE_OPTS += WITH_MEMORY_TRACKING=yes
+endif
+
 # adns uses getaddrinfo_a
 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
 MOSQUITTO_MAKE_OPTS += WITH_ADNS=yes
-- 
2.11.0



More information about the buildroot mailing list