[gvfs] MTP: Fix compilation with libmtp 1.1.5



commit a8965c4e04c9fd14fa2a611aeac6ed620d186c62
Author: Philip Langdale <philipl overt org>
Date:   Wed Apr 3 08:37:55 2013 -0700

    MTP: Fix compilation with libmtp 1.1.5
    
    One of the 1.1.6 specific calls was missing its #ifdef guard.

 daemon/gvfsbackendmtp.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index 5c66005..5df1fdc 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]