Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2017-08-21
Initial Package Version: 1.11
Upstream Status: Not submitted
Origin: Arch Linux, rolled forward for openjpeg-2.2
Description: Fixes for openjpeg-2.2

diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c
index d01de58..6ca3838 100644
--- a/source/fitz/load-jpx.c
+++ b/source/fitz/load-jpx.c
@@ -444,14 +444,18 @@ 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.2/openjpeg.h>
 
 struct fz_jpxd_s
 {
@@ -919,6 +923,10 @@ fz_load_jpx_info(fz_context *ctx, unsigned char *data, size_t size, int *wp, int
 	*yresp = state.yres;
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* HAVE_LURATECH */
 
 #else /* FZ_ENABLE_JPX */
