summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-08-23 08:08:37 +0200
committerGitHub <noreply@github.com>2017-08-23 08:08:37 +0200
commit5c6be4ddb8bd2f3454020ed22e198f304d76a643 (patch)
tree55737760ac7e49d87d0b6896b3a690b54342249b
parent0c3b90ef6bd7db64dff21c5035f03c72cda23cb0 (diff)
parent67e6c1b735d86e5c5a1bdd7aa9cd2852d3ee385f (diff)
Merge pull request #10559 from akien-mga/workaround-gentoos-delightfully-unique-zlib-api
minizip: Fix compatibility with Gentoo's unique zlib API
-rw-r--r--thirdparty/minizip/godot-zlib-1.2.4-minizip-unbreak-gentoo.patch27
-rw-r--r--thirdparty/minizip/ioapi.h16
2 files changed, 43 insertions, 0 deletions
diff --git a/thirdparty/minizip/godot-zlib-1.2.4-minizip-unbreak-gentoo.patch b/thirdparty/minizip/godot-zlib-1.2.4-minizip-unbreak-gentoo.patch
new file mode 100644
index 0000000000..9292e32ac6
--- /dev/null
+++ b/thirdparty/minizip/godot-zlib-1.2.4-minizip-unbreak-gentoo.patch
@@ -0,0 +1,27 @@
+diff --git a/thirdparty/minizip/ioapi.h b/thirdparty/minizip/ioapi.h
+index f25ab6464..6043d34ce 100644
+--- a/thirdparty/minizip/ioapi.h
++++ b/thirdparty/minizip/ioapi.h
+@@ -44,6 +44,22 @@
+ #include <stdlib.h>
+ #include "zlib.h"
+
++/* GODOT start */
++/* Mighty Gentoo saves the day by breaking the API of their zlib.h,
++ * removing this definition of OF(args) for no practical reason
++ * worth breaking compatibility with all projects that embed minizip
++ * while trying not to diverge too much from upstream zlib.
++ * Cf. https://github.com/godotengine/godot/issues/10539
++ *
++ * "By and large, this is good open source behaviour, and fits with
++ * the gentoo _don't fuck with upstream's releases_ philosophy"
++ * -- Gentoo philosopher
++ */
++#ifndef OF /* function prototypes */
++ #define OF(args) args
++#endif
++/* GODOT end */
++
+ #if defined(USE_FILE32API)
+ #define fopen64 fopen
+ #define ftello64 ftell
diff --git a/thirdparty/minizip/ioapi.h b/thirdparty/minizip/ioapi.h
index f25ab6464f..6043d34cea 100644
--- a/thirdparty/minizip/ioapi.h
+++ b/thirdparty/minizip/ioapi.h
@@ -44,6 +44,22 @@
#include <stdlib.h>
#include "zlib.h"
+/* GODOT start */
+/* Mighty Gentoo saves the day by breaking the API of their zlib.h,
+ * removing this definition of OF(args) for no practical reason
+ * worth breaking compatibility with all projects that embed minizip
+ * while trying not to diverge too much from upstream zlib.
+ * Cf. https://github.com/godotengine/godot/issues/10539
+ *
+ * "By and large, this is good open source behaviour, and fits with
+ * the gentoo _don't fuck with upstream's releases_ philosophy"
+ * -- Gentoo philosopher
+ */
+#ifndef OF /* function prototypes */
+ #define OF(args) args
+#endif
+/* GODOT end */
+
#if defined(USE_FILE32API)
#define fopen64 fopen
#define ftello64 ftell