mupdf/mupdf-1.11-openjpeg.patch
Michael J Gruber 3aae5268e0 repair FTBFS from version specific patch
412e729 ("New release 1.11", 2017-04-11) introduced/rewrote the version
specific openjpeg patch. This breaks with every new openjpeg version due
to the changed subdir. Make it independent of that, it's in the include
path.
2017-11-11 18:07:23 +01:00

32 lines
696 B
Diff

diff --git i/source/fitz/load-jpx.c w/source/fitz/load-jpx.c
index d01de585..9934e47a 100644
--- i/source/fitz/load-jpx.c
+++ w/source/fitz/load-jpx.c
@@ -443,12 +443,15 @@ fz_load_jpx_info(fz_context *ctx, unsigned char *data, size_t size, int *wp, int
}
#else /* HAVE_LURATECH */
-
+#ifdef __cplusplus
+extern "C"
+{
#define OPJ_STATIC
#define OPJ_HAVE_INTTYPES_H
#if !defined(_WIN32) && !defined(_WIN64)
#define OPJ_HAVE_STDINT_H
#endif
+#endif
#define USE_JPIP
#include <openjpeg.h>
@@ -920,6 +923,9 @@ fz_load_jpx_info(fz_context *ctx, unsigned char *data, size_t size, int *wp, int
}
#endif /* HAVE_LURATECH */
+#ifdef __cplusplus
+}
+#endif
#else /* FZ_ENABLE_JPX */