summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/expat/expat.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/expat/expat.mk b/package/expat/expat.mk
index a10f2c974a..a78d326d71 100644
--- a/package/expat/expat.mk
+++ b/package/expat/expat.mk
@@ -15,5 +15,14 @@ HOST_EXPAT_DEPENDENCIES = host-pkgconf
EXPAT_LICENSE = MIT
EXPAT_LICENSE_FILES = COPYING
+# Kernel versions older than 3.17 do not support getrandom()
+ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17),)
+EXPAT_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DXML_POOR_ENTROPY"
+endif
+
+# Make build succeed on host kernel older than 3.17. getrandom() will still
+# be used on newer kernels.
+HOST_EXPAT_CONF_ENV += CPPFLAGS="$(HOST_CPPFLAGS) -DXML_POOR_ENTROPY"
+
$(eval $(autotools-package))
$(eval $(host-autotools-package))
OpenPOWER on IntegriCloud