xapp_xload: fix musl build
authorArnout Vandecappelle <arnout@mind.be>
Sun, 20 Nov 2016 22:28:58 +0000 (23:28 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 21 Nov 2016 20:21:38 +0000 (21:21 +0100)
xapp_xload tries to include protocols/rwhod.h, which isn't available on
musl. Fortunately, the package also has stub code that can be enabled
with -DRLOADSTUB (this is done e.g. on Cygwin).

This should probably be detected in configure, but that's a lot more
work.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/x11r7/xapp_xload/xapp_xload.mk

index 1db0db57174d2969b3e1f3348a609dc095a72e2e..364d247a952454fd8e180f829fb7999051382046 100644 (file)
@@ -11,4 +11,9 @@ XAPP_XLOAD_LICENSE = MIT
 XAPP_XLOAD_LICENSE_FILES = COPYING
 XAPP_XLOAD_DEPENDENCIES = xlib_libXaw
 
+ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
+# musl doesn't have rwhod.h, but xload can replace it with stubs
+XAPP_XLOAD_CONF_OPTS += CFLAGS="$(TARGET_CFLAGS) -DRLOADSTUB"
+endif
+
 $(eval $(autotools-package))