summaryrefslogtreecommitdiff
path: root/libgnome-desktop/gnome-desktop-thumbnail.c
diff options
context:
space:
mode:
authorPatrick Welche <prlw1@cam.ac.uk>2014-09-11 17:06:12 +0200
committerPatrick Welche <prlw1@cam.ac.uk>2014-09-11 17:06:12 +0200
commitb9547595ac9fa2a08318589e060778de03897242 (patch)
tree92b5babffa1da97b1f9b44b85fd23fff7092925e /libgnome-desktop/gnome-desktop-thumbnail.c
parent3fc0ffe3b205e0faa0c884c596c38ab5343cc17d (diff)
downloadgnome-desktop-b9547595ac9fa2a08318589e060778de03897242.tar.gz
thumbnail: don't call gs_file_read_noatime() on systems lacking openat()
https://bugzilla.gnome.org/show_bug.cgi?id=735974
Diffstat (limited to 'libgnome-desktop/gnome-desktop-thumbnail.c')
-rw-r--r--libgnome-desktop/gnome-desktop-thumbnail.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
index 330ed7a7..320fba27 100644
--- a/libgnome-desktop/gnome-desktop-thumbnail.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail.c
@@ -145,7 +145,9 @@
#define GNOME_DESKTOP_USE_UNSTABLE_API
#include "gnome-desktop-thumbnail.h"
#include <glib/gstdio.h>
+#ifdef HAVE_OPENAT
#include <libgsystem.h>
+#endif
#define SECONDS_BETWEEN_STATS 10
@@ -485,9 +487,11 @@ _gdk_pixbuf_new_from_uri_at_scale (const char *uri,
}
if (input_stream == NULL) {
+#ifdef HAVE_OPENAT
if (g_file_is_native (file))
input_stream = gs_file_read_noatime (file, NULL, &error);
else
+#endif
input_stream = G_INPUT_STREAM (g_file_read (file, NULL, &error));
if (input_stream == NULL) {
g_warning ("Unable to create an input stream for %s: %s", uri, error->message);