Fix LibRaw 0.21.0 build

This commit is contained in:
Přemysl Eric Janouch 2022-12-23 17:17:22 +01:00
parent c063d93dc7
commit 62d82f38c8
Signed by: p
GPG Key ID: A0420B94F92B9493
2 changed files with 6 additions and 5 deletions

View File

@ -43,6 +43,9 @@
#ifdef HAVE_LIBRAW #ifdef HAVE_LIBRAW
#include <libraw.h> #include <libraw.h>
#if LIBRAW_VERSION >= LIBRAW_MAKE_VERSION(0, 21, 0)
#define LIBRAW_OPIONS_NO_MEMERR_CALLBACK 0
#endif
#endif // HAVE_LIBRAW #endif // HAVE_LIBRAW
#ifdef HAVE_RESVG #ifdef HAVE_RESVG
#include <resvg.h> #include <resvg.h>
@ -1697,11 +1700,6 @@ fail:
#ifdef HAVE_LIBRAW // --------------------------------------------------------- #ifdef HAVE_LIBRAW // ---------------------------------------------------------
// LibRaw 0.21.0 compatibility.
#ifndef LIBRAW_OPIONS_NO_MEMERR_CALLBACK
#define LIBRAW_OPIONS_NO_MEMERR_CALLBACK 0
#endif
static cairo_surface_t * static cairo_surface_t *
open_libraw(const char *data, gsize len, GError **error) open_libraw(const char *data, gsize len, GError **error)
{ {

View File

@ -33,6 +33,9 @@
#ifdef HAVE_LIBRAW #ifdef HAVE_LIBRAW
#include <libraw.h> #include <libraw.h>
#if LIBRAW_VERSION >= LIBRAW_MAKE_VERSION(0, 21, 0)
#define LIBRAW_OPIONS_NO_MEMERR_CALLBACK 0
#endif
#endif // HAVE_LIBRAW #endif // HAVE_LIBRAW
// TODO(p): Consider merging back with fiv-io. // TODO(p): Consider merging back with fiv-io.