Index: Makefile
==================================================================
--- Makefile
+++ Makefile
@@ -58,11 +58,11 @@
 
 # You should not need to change anything below this line
 ###############################################################################
 #
 # Automatic platform-specific options.
-HOST_OS!= uname -s
+HOST_OS :sh = uname -s
 
 LIB.SunOS= -lsocket -lnsl
 LIB += $(LIB.$(HOST_OS))
 
 TCC.DragonFly += -DUSE_PREAD

Index: src/config.h
==================================================================
--- src/config.h
+++ src/config.h
@@ -82,10 +82,17 @@
 
 #ifndef _RC_COMPILE_
 
 #include "sqlite3.h"
 
+/*
+** On Solaris, getpass() will only return up to 8 characters. getpassphrase() returns up to 257.
+*/
+#if defined(__sun__) || defined(sun)
+  #define getpass getpassphrase
+#endif
+
 /*
 ** Typedef for a 64-bit integer
 */
 typedef sqlite3_int64 i64;
 typedef sqlite3_uint64 u64;