-/* If we have a getcwd(3), but it calls popen(), #undef HAVE_GETCWD so
- the replacement in getcwd.c will be built. */
-#if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN)
+/* If we have a getcwd(3), but one that does not dynamically allocate memory,
+ #undef HAVE_GETCWD so the replacement in getcwd.c will be built. We do
+ not do this on Solaris, because their implementation of loopback mounts
+ breaks the traditional file system assumptions that getcwd uses. */
+#if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN) && !defined (SOLARIS)