void-packages/srcpkgs/mupdf/patches/0001-mupdf-openjpeg.patch

30 lines
660 B
Diff
Raw Normal View History

2016-11-29 15:35:45 +00:00
--- source/fitz/load-jpx.c.orig
2016-08-30 15:58:59 +00:00
+++ source/fitz/load-jpx.c
2016-11-29 15:35:45 +00:00
@@ -484,12 +484,17 @@
2016-08-30 15:58:59 +00:00
/* 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>
2016-11-29 15:35:45 +00:00
/* OpenJPEG does not provide a safe mechanism to intercept
* allocations. In the latest version all allocations go
@@ -971,4 +976,7 @@
fz_drop_pixmap(ctx, img);
2016-08-30 15:58:59 +00:00
}
2016-11-29 15:35:45 +00:00
2016-08-30 15:58:59 +00:00
+#ifdef __cplusplus
+}
2016-11-29 15:35:45 +00:00
+#endif
#endif /* HAVE_LURATECH */