summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjan Iversen <jani@libreoffice.org>2017-06-22 16:11:51 +0200
committerjan iversen <jani@libreoffice.org>2017-06-22 18:28:02 +0200
commit346121398b6fbab233bae3053e14868a50418fb6 (patch)
treebf364dbcbf358836ed8a3fcef8f99a6020077d49
parent1adc3c76d773adc92d1c6d858358b7caa64e929a (diff)
expat-2.2.1 patch to allow compile on macOS and others
xmlparse.c has a #define buffer something later #include something that happens to use buffer as a parameter. Change-Id: I7378aa9481b30364097c70317c794c0bcca2f05c Reviewed-on: https://gerrit.libreoffice.org/39109 Reviewed-by: jan iversen <jani@libreoffice.org> Tested-by: jan iversen <jani@libreoffice.org>
-rw-r--r--external/expat/UnpackedTarball_expat.mk1
-rw-r--r--external/expat/expat-2.2.1.patch21
2 files changed, 22 insertions, 0 deletions
diff --git a/external/expat/UnpackedTarball_expat.mk b/external/expat/UnpackedTarball_expat.mk
index abe0679f2f25..5039bc11ab15 100644
--- a/external/expat/UnpackedTarball_expat.mk
+++ b/external/expat/UnpackedTarball_expat.mk
@@ -14,6 +14,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-iOS.patch \
+ external/expat/expat-2.2.1.patch \
))
# This is a bit hackish.
diff --git a/external/expat/expat-2.2.1.patch b/external/expat/expat-2.2.1.patch
new file mode 100644
index 000000000000..029796dd736c
--- /dev/null
+++ b/external/expat/expat-2.2.1.patch
@@ -0,0 +1,21 @@
+--- misc/expat-2.1.0/lib/xmlparse.c 2017-06-22 15:44:06.000000000 +0200
++++ misc/build/expat-2.1.0/lib/xmlparse.c 2017-06-22 15:50:36.000000000 +0200
+@@ -696,6 +696,8 @@
+
+
+ #if defined(HAVE_GETRANDOM) || defined(HAVE_SYSCALL_GETRANDOM)
++/* Patch buffer to undefined */
++#undef buffer
+ # include <errno.h>
+
+ # if defined(HAVE_GETRANDOM)
+@@ -704,6 +706,9 @@
+ # include <unistd.h> /* syscall */
+ # include <sys/syscall.h> /* SYS_getrandom */
+ # endif
++/* Set buffer back */
++#define buffer (parser->m_buffer)
++
+
+ /* Obtain entropy on Linux 3.17+ */
+ static int