diff -urN sqlite-autoconf-3071300/shell.c sqlite-autoconf-3071300-haiku/shell.c
--- sqlite-autoconf-3071300/shell.c	2012-06-11 02:33:44.060817408 -0700
+++ sqlite-autoconf-3071300-haiku/shell.c	2012-06-15 22:51:13.171704320 -0700
@@ -2694,7 +2694,6 @@
 */
 static char *find_home_dir(void){
   static char *home_dir = NULL;
-  if( home_dir ) return home_dir;
 
 #if !defined(_WIN32) && !defined(WIN32) && !defined(__OS2__) && !defined(_WIN32_WCE) && !defined(__RTP__) && !defined(_WRS_KERNEL)
   struct passwd *pwent;
@@ -2704,6 +2703,8 @@
   }
 #endif
 
+  if( home_dir ) return home_dir;
+
 #if defined(_WIN32_WCE)
   /* Windows CE (arm-wince-mingw32ce-gcc) does not provide getenv()
    */
