mupdf/mupdf-1.10a-openjpeg.patch
Pavel Zhukov c923519b02 New release (1.10a)
Signed-off-by: Pavel Zhukov <landgraf@fedoraproject.org>
2017-02-11 20:19:43 +01:00

32 lines
1.3 KiB
Diff

--- a/source/fitz/load-jpx.c
+++ b/source/fitz/load-jpx.c
@@ -484,13 +484,18 @@
/* Without the definition of OPJ_STATIC, compilation fails on windows
* due to the use of __stdcall. We believe it is required on some
* linux toolchains too. */
+
+#ifdef __cplusplus
+extern "C"
+{
#define OPJ_STATIC
#ifndef _MSC_VER
#define OPJ_HAVE_STDINT_H
#endif
+#endif
-#include <openjpeg.h>
-
+#include <openjpeg-2.1/openjpeg.h>
+
/* OpenJPEG does not provide a safe mechanism to intercept
* allocations. In the latest version all allocations go
* though opj_malloc etc, but no context is passed around.
@@ -972,3 +977,7 @@
}
#endif /* HAVE_LURATECH */
+
+#ifdef __cplusplus
+}
+#endif