LOCAL_C_INCLUDES += $(LOCAL_PATH) \
external/exfat/libexfat \
external/fuse/include
-LOCAL_SHARED_LIBRARIES += libz libc libexfat libdl
-LOCAL_STATIC_LIBRARIES += libfuse
+LOCAL_SHARED_LIBRARIES += libz libc libdl
+LOCAL_STATIC_LIBRARIES += libexfat libfuse
include $(BUILD_EXECUTABLE)
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <exfat.h>
#include <stdio.h>
#include <string.h>
-#include <exfat.h>
#include <exfatfs.h>
#include <inttypes.h>
#include <unistd.h>
external/exfat/libexfat \
external/fuse/include \
external/fuse/android
-LOCAL_SHARED_LIBRARIES += libz libc libexfat libdl
-LOCAL_STATIC_LIBRARIES += libfuse
+LOCAL_SHARED_LIBRARIES += libz libc libdl
+LOCAL_STATIC_LIBRARIES += libexfat libfuse
include $(BUILD_EXECUTABLE)
*/
#define FUSE_USE_VERSION 26
+#include <exfat.h>
#include <fuse.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <exfat.h>
#include <inttypes.h>
#include <limits.h>
#include <sys/types.h>
LOCAL_C_INCLUDES += $(LOCAL_PATH) \
LOCAL_SHARED_LIBRARIES += libc
-include $(BUILD_SHARED_LIBRARY)
+include $(BUILD_STATIC_LIBRARY)
#ifndef EXFAT_H_INCLUDED
#define EXFAT_H_INCLUDED
+#if defined(__ANDROID__)
+#define _OFF_T_DEFINED_
+typedef long long off_t;
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#ifdef USE_UBLIO
/* XXX SEEK_CUR will be handled incorrectly */
return dev->pos = lseek(dev->fd, offset, whence);
+#elif defined(__ANDROID__)
+ return lseek64(dev->fd, offset, whence);
#else
return lseek(dev->fd, offset, whence);
#endif
{
#ifdef USE_UBLIO
if (ublio_pread(dev->ufh, buffer, size, offset) != size)
+#elif defined(__ANDROID__)
+ if (pread64(dev->fd, buffer, size, offset) != size)
#else
if (pread(dev->fd, buffer, size, offset) != size)
#endif
{
#ifdef USE_UBLIO
if (ublio_pwrite(dev->ufh, buffer, size, offset) != size)
+#elif defined(__ANDROID__)
+ if (pwrite64(dev->fd, buffer, size, offset) != size)
#else
if (pwrite(dev->fd, buffer, size, offset) != size)
#endif
#ifndef PLATFORM_H_INCLUDED
#define PLATFORM_H_INCLUDED
-#if defined(__GLIBC__)
+#if defined(__GLIBC__) || defined (__ANDROID__)
#include <endian.h>
#include <byteswap.h>
#define __LITTLE_ENDIAN LITTLE_ENDIAN
#define __BIG_ENDIAN BIG_ENDIAN
-#elif defined(__ANDROID__) || defined(__FreeBSD__) || defined(__DragonFlyBSD__) || defined(__NetBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFlyBSD__) || defined(__NetBSD__)
#include <sys/endian.h>
#define bswap_16(x) bswap16(x)
LOCAL_C_INCLUDES += $(LOCAL_PATH) \
external/exfat/libexfat \
external/fuse/include
-LOCAL_SHARED_LIBRARIES += libz libc libexfat libdl
-LOCAL_STATIC_LIBRARIES += libfuse
+LOCAL_SHARED_LIBRARIES += libz libc libdl
+LOCAL_STATIC_LIBRARIES += libexfat libfuse
include $(BUILD_EXECUTABLE)
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <limits.h>
#include "cbm.h"
#include "fat.h"
#include "uct.h"
#include "rootdir.h"
+#include <limits.h>
static off_t cbm_alignment(void)
{
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <exfat.h>
#include <unistd.h>
#include "fat.h"
#include "cbm.h"
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <exfat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
-#include <exfat.h>
#include "mkexfat.h"
#include "vbr.h"
#include "fat.h"
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "mkexfat.h"
#include <sys/types.h>
#include <unistd.h>
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
-#include "mkexfat.h"
static int check_size(off_t volume_size)
{
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <string.h>
#include "rootdir.h"
#include "uct.h"
#include "cbm.h"
#include "uctc.h"
+#include <string.h>
static off_t rootdir_alignment(void)
{
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <string.h>
#include "vbr.h"
#include "fat.h"
#include "cbm.h"
#include "uct.h"
#include "rootdir.h"
+#include <string.h>
static off_t vbr_alignment(void)
{