merge in lmp-mr1-release history after reset to lmp-mr1-dev
diff --git a/dist/Android.patch b/dist/Android.patch
index 4b8ef9d..f60126e 100644
--- a/dist/Android.patch
+++ b/dist/Android.patch
@@ -1,6 +1,6 @@
 diff -r -u -d orig/shell.c ./shell.c
---- orig/shell.c	2014-08-20 16:26:07.117256041 -0700
-+++ ./shell.c	2014-08-20 16:45:00.468546769 -0700
+--- orig/shell.c	2014-10-03 12:18:31.191186450 +0100
++++ ./shell.c	2014-10-03 12:18:31.227186226 +0100
 @@ -35,6 +35,11 @@
  #include "sqlite3.h"
  #include <ctype.h>
@@ -36,8 +36,8 @@
  }
  
 diff -r -u -d orig/sqlite3.c ./sqlite3.c
---- orig/sqlite3.c	2014-08-20 16:26:07.145255923 -0700
-+++ ./sqlite3.c	2014-08-20 16:26:36.205134826 -0700
+--- orig/sqlite3.c	2014-10-03 12:18:31.223186251 +0100
++++ ./sqlite3.c	2014-11-19 14:12:49.785181208 +0000
 @@ -24109,6 +24109,13 @@
  */
  #if SQLITE_OS_UNIX              /* This file is used on unix only */
@@ -80,7 +80,23 @@
  
    { "fchmod",       (sqlite3_syscall_ptr)fchmod,     0  },
  #define osFchmod    ((int(*)(int,mode_t))aSyscall[14].pCurrent)
-@@ -27909,7 +27927,7 @@
+@@ -25301,7 +25319,14 @@
+ #if OS_VXWORKS
+   struct vxworksFileId *pId;  /* Unique file ID for vxworks. */
+ #else
+-  ino_t ino;                  /* Inode number */
++#ifdef ANDROID
++  // Bionic's struct stat has a 64 bit st_ino on both 32 and
++  // 64 bit architectures. ino_t remains 32 bits wide on 32 bit
++  // architectures and can lead to inode truncation.
++  unsigned long long ino;     /* Inode number */
++#else
++  ino_t ino;     /* Inode number */
++#endif
+ #endif
+ };
+ 
+@@ -27909,7 +27934,7 @@
    SimulateIOError( rc=1 );
    if( rc!=0 ){
      ((unixFile*)id)->lastErrno = errno;
@@ -89,7 +105,7 @@
    }
    *pSize = buf.st_size;
  
-@@ -27944,7 +27962,9 @@
+@@ -27944,7 +27969,9 @@
      i64 nSize;                    /* Required file size */
      struct stat buf;              /* Used to hold return values of fstat() */
     
@@ -100,7 +116,7 @@
  
      nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
      if( nSize>(i64)buf.st_size ){
-@@ -28510,7 +28530,7 @@
+@@ -28510,7 +28537,7 @@
      ** with the same permissions.
      */
      if( osFstat(pDbFd->h, &sStat) && pInode->bProcessLock==0 ){
@@ -109,7 +125,7 @@
        goto shm_open_err;
      }
  
-@@ -29848,7 +29868,7 @@
+@@ -29848,7 +29875,7 @@
        *pUid = sStat.st_uid;
        *pGid = sStat.st_gid;
      }else{
@@ -118,7 +134,7 @@
      }
    }else if( flags & SQLITE_OPEN_DELETEONCLOSE ){
      *pMode = 0600;
-@@ -100867,7 +100887,7 @@
+@@ -100867,7 +100894,7 @@
    }
    if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){
      sqlite3SetString(pzErrMsg, db, "unsupported file format");
@@ -127,7 +143,7 @@
      goto initone_error_out;
    }
  
-@@ -124770,9 +124790,9 @@
+@@ -124770,9 +124797,9 @@
  #endif
  
  #ifdef SQLITE_ENABLE_FTS3
@@ -140,7 +156,7 @@
  #endif
  
  #ifdef SQLITE_ENABLE_ICU
-@@ -130660,16 +130680,28 @@
+@@ -130660,16 +130687,28 @@
    ** module with sqlite.
    */
    if( SQLITE_OK==rc 
diff --git a/dist/sqlite3.c b/dist/sqlite3.c
index edd2045..e1aa127 100644
--- a/dist/sqlite3.c
+++ b/dist/sqlite3.c
@@ -25319,7 +25319,14 @@
 #if OS_VXWORKS
   struct vxworksFileId *pId;  /* Unique file ID for vxworks. */
 #else
-  ino_t ino;                  /* Inode number */
+#ifdef ANDROID
+  // Bionic's struct stat has a 64 bit st_ino on both 32 and
+  // 64 bit architectures. ino_t remains 32 bits wide on 32 bit
+  // architectures and can lead to inode truncation.
+  unsigned long long ino;     /* Inode number */
+#else
+  ino_t ino;     /* Inode number */
+#endif
 #endif
 };