summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2017-07-13 15:23:32 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2017-07-13 15:24:33 +0200
commitf78ed1ec528604f6db9bdd2a07462c5e99e0ab99 (patch)
tree4e85e44df01fce4caf53cc8cdcfa8ec5f4217624 /external
parent3697b87b70c69e17e1d0398e0192a11dab179fe3 (diff)
fix getrandom check in expat's configure
https://github.com/libexpat/libexpat/issues/52 fixes /usr/include/sys/random.h:37:22: error: expected ')' misdetection of random.h feature, already fixed upstream: https://github.com/libexpat/libexpat/commit/602e6c78ca750c082b72f8cdf4a38839b312959f Change-Id: I65e4aebaa838d2931a60cb34806d87b88861c4d8
Diffstat (limited to 'external')
-rw-r--r--external/expat/UnpackedTarball_expat.mk1
-rw-r--r--external/expat/expat.getrandom_detection.patch.140
2 files changed, 41 insertions, 0 deletions
diff --git a/external/expat/UnpackedTarball_expat.mk b/external/expat/UnpackedTarball_expat.mk
index 5039bc11ab15..42d03de32315 100644
--- a/external/expat/UnpackedTarball_expat.mk
+++ b/external/expat/UnpackedTarball_expat.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,expat,\
external/expat/expat-winapi.patch \
external/expat/expat-iOS.patch \
external/expat/expat-2.2.1.patch \
+ external/expat/expat.getrandom_detection.patch.1 \
))
# This is a bit hackish.
diff --git a/external/expat/expat.getrandom_detection.patch.1 b/external/expat/expat.getrandom_detection.patch.1
new file mode 100644
index 000000000000..eaf25df767dd
--- /dev/null
+++ b/external/expat/expat.getrandom_detection.patch.1
@@ -0,0 +1,40 @@
+https://github.com/libexpat/libexpat/issues/52
+
+fixes /usr/include/sys/random.h:37:22: error: expected ')'
+misdetection of random.h feature, already fixed upstream:
+https://github.com/libexpat/libexpat/commit/602e6c78ca750c082b72f8cdf4a38839b312959f
+
+diff -ur expat.org/configure expat/configure
+--- expat.org/configure 2017-07-12 17:04:34.000000000 +0200
++++ expat/configure 2017-07-12 17:05:59.000000000 +0200
+@@ -16341,7 +16341,7 @@
+ }
+
+ _ACEOF
+-if ac_fn_c_try_compile "$LINENO"; then :
++if ac_fn_c_try_link "$LINENO"; then :
+
+
+ $as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
+@@ -16386,7 +16386,8 @@
+ conftest$ac_exeext conftest.$ac_ext
+
+ fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+
+
+ for ac_header in fcntl.h unistd.h
+diff -ur expat.org/configure.ac expat/configure.ac
+--- expat.org/configure.ac 2017-07-12 17:04:34.000000000 +0200
++++ expat/configure.ac 2017-07-12 17:05:31.000000000 +0200
+@@ -130,7 +130,7 @@
+
+
+ AC_MSG_CHECKING([for getrandom (Linux 3.17+, glibc 2.25+)])
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++AC_LINK_IFELSE([AC_LANG_SOURCE([
+ #include <stdlib.h> /* for NULL */
+ #include <sys/random.h>
+ int main() {