diff -ur '--exclude=*~' Python-2.7.2.orig/Lib/ctypes/__init__.py Python-2.7.2/Lib/ctypes/__init__.py
--- Python-2.7.2.orig/Lib/ctypes/__init__.py	2011-06-11 16:46:24.000000000 +0100
+++ Python-2.7.2/Lib/ctypes/__init__.py	2015-03-19 12:32:45.747723687 +0000
@@ -272,31 +272,34 @@
     else:
         set_conversion_mode("ascii", "strict")
 
-    class c_wchar_p(_SimpleCData):
-        _type_ = "Z"
-
-    class c_wchar(_SimpleCData):
-        _type_ = "u"
-
-    POINTER(c_wchar).from_param = c_wchar_p.from_param #_SimpleCData.c_wchar_p_from_param
-
-    def create_unicode_buffer(init, size=None):
-        """create_unicode_buffer(aString) -> character array
-        create_unicode_buffer(anInteger) -> character array
-        create_unicode_buffer(aString, anInteger) -> character array
-        """
-        if isinstance(init, (str, unicode)):
-            if size is None:
-                size = len(init)+1
-            buftype = c_wchar * size
-            buf = buftype()
-            buf.value = init
-            return buf
-        elif isinstance(init, (int, long)):
-            buftype = c_wchar * init
-            buf = buftype()
-            return buf
-        raise TypeError(init)
+# The wchar stuff causes a crash on Android (the bionic C library doesn't
+# implement wchar_t anyway)
+#
+#    class c_wchar_p(_SimpleCData):
+#        _type_ = "Z"
+#
+#    class c_wchar(_SimpleCData):
+#        _type_ = "u"
+#
+#    POINTER(c_wchar).from_param = c_wchar_p.from_param #_SimpleCData.c_wchar_p_from_param
+#
+#    def create_unicode_buffer(init, size=None):
+#        """create_unicode_buffer(aString) -> character array
+#        create_unicode_buffer(anInteger) -> character array
+#        create_unicode_buffer(aString, anInteger) -> character array
+#        """
+#        if isinstance(init, (str, unicode)):
+#            if size is None:
+#                size = len(init)+1
+#            buftype = c_wchar * size
+#            buf = buftype()
+#            buf.value = init
+#            return buf
+#        elif isinstance(init, (int, long)):
+#            buftype = c_wchar * init
+#            buf = buftype()
+#            return buf
+#        raise TypeError(init)
 
 POINTER(c_char).from_param = c_char_p.from_param #_SimpleCData.c_char_p_from_param
 
diff -ur '--exclude=*~' Python-2.7.2.orig/Modules/_ctypes/callproc.c Python-2.7.2/Modules/_ctypes/callproc.c
--- Python-2.7.2.orig/Modules/_ctypes/callproc.c	2015-03-19 11:56:40.668159317 +0000
+++ Python-2.7.2/Modules/_ctypes/callproc.c	2015-03-19 11:45:45.898288000 +0000
@@ -1423,7 +1423,7 @@
     mode |= RTLD_NOW;
     handle = ctypes_dlopen(name, mode);
     if (!handle) {
-        char *errmsg = ctypes_dlerror();
+        const char *errmsg = ctypes_dlerror();
         if (!errmsg)
             errmsg = "dlopen() error";
         PyErr_SetString(PyExc_OSError,
diff -ur '--exclude=*~' Python-2.7.2.orig/Modules/_ctypes/libffi/src/dlmalloc.c Python-2.7.2/Modules/_ctypes/libffi/src/dlmalloc.c
--- Python-2.7.2.orig/Modules/_ctypes/libffi/src/dlmalloc.c	2015-03-19 13:26:58.928438829 +0000
+++ Python-2.7.2/Modules/_ctypes/libffi/src/dlmalloc.c	2015-03-19 15:32:19.042396376 +0000
@@ -614,18 +614,6 @@
 #include "/usr/include/malloc.h"
 #else /* HAVE_USR_INCLUDE_MALLOC_H */
 
-struct mallinfo {
-  MALLINFO_FIELD_TYPE arena;    /* non-mmapped space allocated from system */
-  MALLINFO_FIELD_TYPE ordblks;  /* number of free chunks */
-  MALLINFO_FIELD_TYPE smblks;   /* always 0 */
-  MALLINFO_FIELD_TYPE hblks;    /* always 0 */
-  MALLINFO_FIELD_TYPE hblkhd;   /* space in mmapped regions */
-  MALLINFO_FIELD_TYPE usmblks;  /* maximum total allocated space */
-  MALLINFO_FIELD_TYPE fsmblks;  /* always 0 */
-  MALLINFO_FIELD_TYPE uordblks; /* total allocated space */
-  MALLINFO_FIELD_TYPE fordblks; /* total free space */
-  MALLINFO_FIELD_TYPE keepcost; /* releasable (via malloc_trim) space */
-};
 
 #endif /* HAVE_USR_INCLUDE_MALLOC_H */
 #endif /* NO_MALLINFO */
@@ -966,7 +954,7 @@
   p = malloc(n);
   assert(malloc_usable_size(p) >= 256);
 */
-size_t dlmalloc_usable_size(void*);
+size_t dlmalloc_usable_size(const void*);
 
 /*
   malloc_stats();
@@ -4384,7 +4372,7 @@
   internal_malloc_stats(gm);
 }
 
-size_t dlmalloc_usable_size(void* mem) {
+size_t dlmalloc_usable_size(const void* mem) {
   if (mem != 0) {
     mchunkptr p = mem2chunk(mem);
     if (cinuse(p))

