-#define FTS_DNR 3 /* unreadable directory */
-#define FTS_DNX 4 /* unsearchable directory */
-#define FTS_DP 5 /* postorder directory */
-#define FTS_ERR 6 /* error; errno is set */
-#define FTS_F 7 /* regular file */
-#define FTS_NS 8 /* no stat(2) information */
-#define FTS_SL 9 /* symbolic link */
-#define FTS_SLNONE 10 /* symbolic link without target */
-#define FTS_DEFAULT 11 /* none of the above */
- u_short fts_info; /* flags for FTSENT structure */
-#define FTS__NOINSTR 0 /* private: no instructions */
-#define FTS_AGAIN 1 /* user: read node again */
-#define FTS_SKIP 2 /* user: discard node */
-#define FTS_FOLLOW 3 /* user: follow symbolic link */
- short fts_instr; /* private: fts_set() instructions */
- struct stat fts_statb; /* stat(2) information */
+#define FTS_DEFAULT 3 /* none of the above */
+#define FTS_DNR 4 /* unreadable directory */
+#define FTS_DOT 5 /* dot or dot-dot */
+#define FTS_DP 6 /* postorder directory */
+#define FTS_ERR 7 /* error; errno is set */
+#define FTS_F 8 /* regular file */
+#define FTS_INIT 9 /* initialized only */
+#define FTS_NS 10 /* stat(2) failed */
+#define FTS_NSOK 11 /* no stat(2) requested */
+#define FTS_SL 12 /* symbolic link */
+#define FTS_SLNONE 13 /* symbolic link without target */
+#define FTS_W 14 /* whiteout object */
+ u_short fts_info; /* user flags for FTSENT structure */
+
+#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
+#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
+#define FTS_ISW 0x04 /* this is a whiteout object */
+ u_short fts_flags; /* private flags for FTSENT structure */
+
+#define FTS_AGAIN 1 /* read node again */
+#define FTS_FOLLOW 2 /* follow symbolic link */
+#define FTS_NOINSTR 3 /* no instructions */
+#define FTS_SKIP 4 /* discard node */
+ u_short fts_instr; /* fts_set() instructions */
+
+ struct stat *fts_statp; /* stat(2) information */