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:32:49 +0200
commit5ff5e093aac0726e19962cd3622e54877d7acd51 (patch)
tree5a008194f5924b38e43b003686c542817304c1f9 /external
parent71a5bda1f65fa1b87a290f15c24034d25a9f1f25 (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 (cherry picked from commit f78ed1ec528604f6db9bdd2a07462c5e99e0ab99) 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 60e933d76090..5d803dcf303a 100644
--- a/external/expat/UnpackedTarball_expat.mk
+++ b/external/expat/UnpackedTarball_expat.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,expat,$(EXPAT_TARBALL)))
$(eval $(call gb_UnpackedTarball_add_patches,expat,\
external/expat/expat-winapi.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() {