]> git.pld-linux.org Git - packages/geeqie.git/blob - geeqie-raws.patch
add forgotten patch
[packages/geeqie.git] / geeqie-raws.patch
1 Subject: Fix RAW photos display with new GCC
2 From: David Kalnischkies <david@kalnischkies.de>
3
4 diff --git a/src/exiv2.cc b/src/exiv2.cc
5 index 455c8d3..98029cd 100644
6 --- a/src/exiv2.cc
7 +++ b/src/exiv2.cc
8 @@ -16,6 +16,7 @@
9  #include <exiv2/image.hpp>
10  #include <exiv2/exif.hpp>
11  #include <iostream>
12 +#include <string>
13  
14  // EXIV2_TEST_VERSION is defined in Exiv2 0.15 and newer.
15  #ifndef EXIV2_TEST_VERSION
16 @@ -1130,9 +1131,9 @@ guchar *exif_get_preview(ExifData *exif, guint *data_len, gint requested_width,
17  
18         if (!exif->image()) return NULL;
19         
20 -       const char* path = exif->image()->io().path().c_str();
21 +       std::string const path = exif->image()->io().path();
22         /* given image pathname, first do simple (and fast) file extension test */
23 -       gboolean is_raw = filter_file_class(path, FORMAT_CLASS_RAWIMAGE);
24 +       gboolean is_raw = filter_file_class(path.c_str(), FORMAT_CLASS_RAWIMAGE);
25         
26         if (!is_raw && requested_width == 0) return NULL;
27  
28 @@ -1232,10 +1233,10 @@ extern "C" guchar *exif_get_preview(ExifData *exif, guint *data_len, gint reques
29         if (!exif) return NULL;
30         if (!exif->image()) return NULL;
31  
32 -       const char* path = exif->image()->io().path().c_str();
33 +       std::string const path = exif->image()->io().path();
34  
35         /* given image pathname, first do simple (and fast) file extension test */
36 -       if (!filter_file_class(path, FORMAT_CLASS_RAWIMAGE)) return NULL;
37 +       if (!filter_file_class(path.c_str(), FORMAT_CLASS_RAWIMAGE)) return NULL;
38  
39         try {
40                 struct stat st;
41 @@ -1246,9 +1247,9 @@ extern "C" guchar *exif_get_preview(ExifData *exif, guint *data_len, gint reques
42                 
43                 RawFile rf(exif->image()->io());
44                 offset = rf.preview_offset();
45 -               DEBUG_1("%s: offset %lu", path, offset);
46 +               DEBUG_1("%s: offset %lu", path.c_str(), offset);
47                 
48 -               fd = open(path, O_RDONLY);
49 +               fd = open(path.c_str(), O_RDONLY);
50                 if (fd == -1)
51                         {
52                         return NULL;
This page took 0.581516 seconds and 3 git commands to generate.