Blob Blame History Raw
diff --git i/source/fitz/load-jpx.c w/source/fitz/load-jpx.c
index 65699bab..800ee32c 100644
--- i/source/fitz/load-jpx.c
+++ w/source/fitz/load-jpx.c
@@ -444,12 +444,15 @@ fz_load_jpx_info(fz_context *ctx, const unsigned char *data, size_t size, int *w
 }
 
 #else /* HAVE_LURATECH */
-
+#ifdef __cplusplus
+extern "C"
+{
 #define OPJ_STATIC
 #define OPJ_HAVE_INTTYPES_H
 #if !defined(_MSC_VER) || _MSC_VER >= 1600
 #define OPJ_HAVE_STDINT_H
 #endif
+#endif
 #define USE_JPIP
 
 #include <openjpeg.h>
@@ -931,6 +934,9 @@ fz_load_jpx_info(fz_context *ctx, const unsigned char *data, size_t size, int *w
 }
 
 #endif /* HAVE_LURATECH */
+#ifdef __cplusplus
+}
+#endif
 
 #else /* FZ_ENABLE_JPX */