aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fiv-io.c8
-rw-r--r--fiv-thumbnail.c3
2 files changed, 6 insertions, 5 deletions
diff --git a/fiv-io.c b/fiv-io.c
index c17abca..0c4d0e5 100644
--- a/fiv-io.c
+++ b/fiv-io.c
@@ -43,6 +43,9 @@
#ifdef HAVE_LIBRAW
#include <libraw.h>
+#if LIBRAW_VERSION >= LIBRAW_MAKE_VERSION(0, 21, 0)
+#define LIBRAW_OPIONS_NO_MEMERR_CALLBACK 0
+#endif
#endif // HAVE_LIBRAW
#ifdef HAVE_RESVG
#include <resvg.h>
@@ -1697,11 +1700,6 @@ fail:
#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 *
open_libraw(const char *data, gsize len, GError **error)
{
diff --git a/fiv-thumbnail.c b/fiv-thumbnail.c
index f95ed70..d0ec91a 100644
--- a/fiv-thumbnail.c
+++ b/fiv-thumbnail.c
@@ -33,6 +33,9 @@
#ifdef HAVE_LIBRAW
#include <libraw.h>
+#if LIBRAW_VERSION >= LIBRAW_MAKE_VERSION(0, 21, 0)
+#define LIBRAW_OPIONS_NO_MEMERR_CALLBACK 0
+#endif
#endif // HAVE_LIBRAW
// TODO(p): Consider merging back with fiv-io.