mupdf/mupdf-1.11-openjpeg.patch

37 lines
755 B
Diff
Raw Normal View History

2017-04-11 16:56:45 +00:00
diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c
index d01de58..a07dbb5 100644
--- a/source/fitz/load-jpx.c
+++ b/source/fitz/load-jpx.c
@@ -443,15 +443,19 @@ 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>
+#include <openjpeg-2.1/openjpeg.h>
+
struct fz_jpxd_s
{
@@ -920,6 +924,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 */