Skip to contentSkip to conversation

mosquitto: fix build on uClibc

Buildroot Peter Korsgaard 1 participant 2 messages Nov 26, 2018

lore
Share & tools
lore
#0 lore raw

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.

---
 package/mosquitto/mosquitto.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/mosquitto/mosquitto.mk +7 -0
index fcce0535cb..d01811e5aa 100644
@@ -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
Signature · 1 line
2.11.0
#1 lore raw
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

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

Quoted 8 lines

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.

Committed to 2018.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard