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 +#include + 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 */