diff -r d392f5a61a48 common-session.c
--- a/common-session.c	Thu Feb 23 21:46:02 2012 +0800
+++ b/common-session.c	Tue Mar 06 00:00:04 2012 +0100
@@ -453,6 +453,7 @@
 	ses.authstate.pw_name = m_strdup(pw->pw_name);
 	ses.authstate.pw_dir = m_strdup(pw->pw_dir);
 	ses.authstate.pw_shell = m_strdup(pw->pw_shell);
-	ses.authstate.pw_passwd = m_strdup(pw->pw_passwd);
+	// Android returns NULL as password
+	ses.authstate.pw_passwd = m_strdup(pw->pw_passwd ? pw->pw_passwd : "");
 }
 
diff -r d392f5a61a48 loginrec.c
--- a/loginrec.c	Thu Feb 23 21:46:02 2012 +0800
+++ b/loginrec.c	Tue Mar 06 00:00:04 2012 +0100
@@ -158,6 +158,10 @@
 #include "dbutil.h"
 #include "atomicio.h"
 
+#ifndef DEAD_PROCESS
+#define DEAD_PROCESS 8
+#endif
+
 /**
  ** prototypes for helper functions in this file
  **/
diff -r d392f5a61a48 sshpty.c
--- a/sshpty.c	Thu Feb 23 21:46:02 2012 +0800
+++ b/sshpty.c	Tue Mar 06 00:00:04 2012 +0100
@@ -133,7 +133,7 @@
 		close(*ptyfd);
 		return 0;
 	}
-#ifndef HAVE_CYGWIN
+#if !defined(HAVE_CYGWIN) && defined(I_PUSH)
 	/*
 	 * Push the appropriate streams modules, as described in Solaris pts(7).
 	 * HP-UX pts(7) doesn't have ttcompat module.
diff -r d392f5a61a48 svr-auth.c
--- a/svr-auth.c	Thu Feb 23 21:46:02 2012 +0800
+++ b/svr-auth.c	Tue Mar 06 00:00:04 2012 +0100
@@ -258,6 +258,7 @@
 		usershell = "/bin/sh";
 	}
 
+#ifdef DISABLE_SHELL_CHECK
 	/* check the shell is valid. If /etc/shells doesn't exist, getusershell()
 	 * should return some standard shells like "/bin/sh" and "/bin/csh" (this
 	 * is platform-specific) */
@@ -280,6 +281,7 @@
 goodshell:
 	endusershell();
 	TRACE(("matching shell"))
+#endif
 
 	TRACE(("uid = %d", ses.authstate.pw_uid))
 	TRACE(("leave checkusername"))
