godot-zlib-1.2.4-minizip-unbreak-gentoo.patch 947 B

12345678910111213141516171819202122232425262728
  1. diff --git a/thirdparty/minizip/ioapi.h b/thirdparty/minizip/ioapi.h
  2. index f25ab6464..6043d34ce 100644
  3. --- a/thirdparty/minizip/ioapi.h
  4. +++ b/thirdparty/minizip/ioapi.h
  5. @@ -44,6 +44,22 @@
  6. #include <stdlib.h>
  7. #include "zlib.h"
  8. +/* GODOT start */
  9. +/* Mighty Gentoo saves the day by breaking the API of their zlib.h,
  10. + * removing this definition of OF(args) for no practical reason
  11. + * worth breaking compatibility with all projects that embed minizip
  12. + * while trying not to diverge too much from upstream zlib.
  13. + * Cf. https://github.com/godotengine/godot/issues/10539
  14. + *
  15. + * "By and large, this is good open source behaviour, and fits with
  16. + * the gentoo _don't fuck with upstream's releases_ philosophy"
  17. + * -- Gentoo philosopher
  18. + */
  19. +#ifndef OF /* function prototypes */
  20. + #define OF(args) args
  21. +#endif
  22. +/* GODOT end */
  23. +
  24. #if defined(USE_FILE32API)
  25. #define fopen64 fopen
  26. #define ftello64 ftell