* Copyright (C) 2008 Linus Torvalds
  */
 #include "cache.h"
+
+#ifdef NO_PTHREADS
+static void preload_index(struct index_state *index, const char **pathspec)
+{
+       ; /* nothing */
+}
+#else
+
 #include <pthread.h>
 
 /*
                        continue;
                if (lstat(ce->name, &st))
                        continue;
-               if (ie_match_stat(index, ce, &st, 0))
+               if (ie_match_stat(index, ce, &st, CE_MATCH_RACY_IS_DIRTY))
                        continue;
                ce_mark_uptodate(ce);
        } while (--nr > 0);
                        die("unable to join threaded lstat");
        }
 }
+#endif
 
 int read_index_preload(struct index_state *index, const char **pathspec)
 {