summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2013-04-03 08:37:55 -0700
committerPhilip Langdale <philipl@overt.org>2013-04-03 08:38:23 -0700
commita8965c4e04c9fd14fa2a611aeac6ed620d186c62 (patch)
tree24e3ca4899f125b072af5b55ea94bf046454ad91
parent94f8380381c46b1512712be1192894dd9a9e12f0 (diff)
downloadgvfs-a8965c4e04c9fd14fa2a611aeac6ed620d186c62.tar.gz
MTP: Fix compilation with libmtp 1.1.5
One of the 1.1.6 specific calls was missing its #ifdef guard.
-rw-r--r--daemon/gvfsbackendmtp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index 5c660053..5df1fdc1 100644
--- a/daemon/gvfsbackendmtp.c
+++ b/daemon/gvfsbackendmtp.c
@@ -1897,6 +1897,7 @@ do_read (GVfsBackend *backend,
uint32_t actual;
if (handle->handle_type == HANDLE_FILE) {
+#if HAVE_LIBMTP_1_1_6
unsigned char *temp;
int ret = LIBMTP_GetPartialObject (G_VFS_BACKEND_MTP (backend)->device, id, offset,
bytes_requested, &temp, &actual);
@@ -1908,6 +1909,9 @@ do_read (GVfsBackend *backend,
memcpy (buffer, temp, actual);
free (temp);
+#else
+ g_assert_not_reached ();
+#endif
} else {
GByteArray *bytes = handle->bytes;
actual = MIN (bytes->len - offset, bytes_requested);