return (max + 1);
}
+#ifdef __minix
+#include <minix/dmap.h>
+#endif
+
/*
* Change to dir specified by fd or p->fts_accpath without getting
* tricked by someone changing the world out from underneath us.
if (fstat(fd, &sb) == -1)
goto bail;
+#ifdef __minix
+ /*
+ * Skip the safety check on file systems where inodes are not static.
+ * On such file systems, a file may legitimately be assigned a new
+ * inode number due to being deleted and regenerated while we are
+ * running. This behavior is not POSIX compliant, but necessary for
+ * certain types of file systems. Currently, we assume that this
+ * applies to all (and only) file systems that are not device backed.
+ * In the future, we may have to obtain an appropriate flag through
+ * statvfs(3) instead.
+ */
+ if ((sb.st_ino != p->fts_ino || sb.st_dev != p->fts_dev)
+ && major(sb.st_dev) != NONE_MAJOR) {
+#else
if (sb.st_ino != p->fts_ino || sb.st_dev != p->fts_dev) {
+#endif
errno = ENOENT;
goto bail;
}