mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 18:23:09 +00:00
30 lines
676 B
Diff
30 lines
676 B
Diff
--- a/source/fitz/load-jpx.c
|
|
+++ b/source/fitz/load-jpx.c
|
|
@@ -484,12 +484,16 @@
|
|
/* 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-__OPENJPEG__VERSION__/openjpeg.h>
|
|
|
|
/* OpenJPEG does not provide a safe mechanism to intercept
|
|
* allocations. In the latest version all allocations go
|
|
@@ -971,4 +975,8 @@
|
|
fz_drop_pixmap(ctx, img);
|
|
}
|
|
|
|
+#ifdef __cplusplus
|
|
+}
|
|
+#endif
|
|
+
|
|
#endif /* HAVE_LURATECH */
|