prosody: fix build with musl libc
authorBaruch Siach <baruch@tkos.co.il>
Tue, 3 Apr 2018 04:45:24 +0000 (07:45 +0300)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 3 Apr 2018 13:45:06 +0000 (15:45 +0200)
musl libc does not provide the mallinfo() API. Define WITHOUT_MALLINFO
to skip the code using it.

Fixes:
http://autobuild.buildroot.net/results/42c/42cd6e3be761d1cb358bc50acd7fa58c8aa1c750/
http://autobuild.buildroot.net/results/29d/29d8dcbe013e549a865c0c5953272dab1fe5f777/
http://autobuild.buildroot.net/results/a6d/a6deb7440f80b072432c0f9c048e59abe4edf1c0/

Cc: Dushara Jayasinghe <nidujay@gmail.com>
Cc: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/prosody/prosody.mk

index c5a83081dcface424138560b76cd9519ea3c4505..d95578253d6d200b890851f84e5bf141590ae9e6 100644 (file)
@@ -10,12 +10,15 @@ PROSODY_LICENSE = MIT
 PROSODY_LICENSE_FILES = COPYING
 PROSODY_DEPENDENCIES = host-luainterpreter luainterpreter libidn openssl
 
+PROSODY_CFLAGS = $(TARGET_CFLAGS) -fPIC -std=c99 \
+       $(if BR2_TOOLCHAIN_USES_MUSL,-DWITHOUT_MALLINFO)
+
 PROSODY_CONF_OPTS = \
        --with-lua-bin=$(HOST_DIR)/usr/bin \
        --with-lua=$(STAGING_DIR)/usr \
        --lua-version=$(LUAINTERPRETER_ABIVER) \
        --c-compiler=$(TARGET_CC) \
-       --cflags="$(TARGET_CFLAGS) -fPIC -std=c99" \
+       --cflags="$(PROSODY_CFLAGS)" \
        --linker=$(TARGET_CC) \
        --ldflags="$(TARGET_LDFLAGS) -shared" \
        --sysconfdir=/etc/prosody \