Index: libgc/include/private/gcconfig.h
===================================================================
--- libgc/include/private/gcconfig.h	(revision 123727)
+++ libgc/include/private/gcconfig.h	(working copy)
@@ -1868,6 +1868,8 @@
 #	     include <features.h>
 #	     if defined(__GLIBC__) && __GLIBC__ >= 2
 #		 define SEARCH_FOR_DATA_START
+#	     elif defined(PLATFORM_ANDROID)
+#		 define SEARCH_FOR_DATA_START
 #	     else
      	         extern char **__environ;
 #                define DATASTART ((ptr_t)(&__environ))
Index: mono/io-layer/io.c
===================================================================
--- mono/io-layer/io.c	(revision 123727)
+++ mono/io-layer/io.c	(working copy)
@@ -3706,7 +3706,7 @@
 #endif
 }
 
-#if defined(HAVE_STATVFS) || defined(HAVE_STATFS)
+#if (defined(HAVE_STATVFS) || defined(HAVE_STATFS)) && !defined(PLATFORM_ANDROID)
 gboolean GetDiskFreeSpaceEx(const gunichar2 *path_name, WapiULargeInteger *free_bytes_avail,
 			    WapiULargeInteger *total_number_of_bytes,
 			    WapiULargeInteger *total_number_of_free_bytes)
Index: mono/metadata/attach.c
===================================================================
--- mono/metadata/attach.c	(revision 123727)
+++ mono/metadata/attach.c	(working copy)
@@ -366,7 +366,12 @@
 	 */
 	/* FIXME: Use TMP ? */
 	pw = NULL;
+#ifdef HAVE_GETPWUID_R
 	res = getpwuid_r (getuid (), &pwbuf, buf, sizeof (buf), &pw);
+#else
+	pw = getpwuid(getuid ());
+	res = pw != NULL ? 0 : 1;
+#endif
 	if (res != 0) {
 		fprintf (stderr, "attach: getpwuid_r () failed.\n");
 		return;
Index: mono/metadata/socket-io.c
===================================================================
--- mono/metadata/socket-io.c	(revision 123727)
+++ mono/metadata/socket-io.c	(working copy)
@@ -78,6 +78,11 @@
 #undef AF_INET6
 #endif
 
+#ifdef PLATFORM_ANDROID
+// not yet actually implemented...
+#undef AF_INET6
+#endif
+
 #undef DEBUG
 
 static gint32 convert_family(MonoAddressFamily mono_family)
Index: mono/mini/mini-arm.c
===================================================================
--- mono/mini/mini-arm.c	(revision 123727)
+++ mono/mini/mini-arm.c	(working copy)
@@ -587,6 +587,18 @@
 	sys_icache_invalidate (code, size);
 #elif __GNUC_PREREQ(4, 1)
 	__clear_cache (code, code + size);
+#elif defined(PLATFORM_ANDROID)
+	const int syscall = 0xf0002;
+	__asm __volatile (
+		"mov	 r0, %0\n"			
+		"mov	 r1, %1\n"
+		"mov	 r7, %2\n"
+		"mov     r2, #0x0\n"
+		"svc     0x00000000\n"
+		:
+		:	"r" (code), "r" (code + size), "r" (syscall)
+		:	"r0", "r1", "r7"
+		);
 #else
 	__asm __volatile ("mov r0, %0\n"
 			"mov r1, %1\n"
Index: mono/utils/mono-mmap.c
===================================================================
--- mono/utils/mono-mmap.c	(revision 123727)
+++ mono/utils/mono-mmap.c	(working copy)
@@ -197,7 +197,7 @@
 	return 0;
 }
 
-#elif defined(HAVE_MMAP)
+#elif defined(HAVE_MMAP) && defined(HAVE_SHM_OPEN)
 
 /**
  * mono_pagesize:
