aboutsummaryrefslogtreecommitdiff
path: root/include/fts.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-03 09:00:13 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-15 10:42:11 -0300
commit70961aee1823481caac6e00a40cf1f2bdbf7ffb5 (patch)
treeecb5da43310a12d98e6c98dbd63dacb9c3f60394 /include/fts.h
parent84f7ce84474c1648ce96884f1c91ca7b97ca3fc2 (diff)
downloadglibc-70961aee1823481caac6e00a40cf1f2bdbf7ffb5.zip
glibc-70961aee1823481caac6e00a40cf1f2bdbf7ffb5.tar.gz
glibc-70961aee1823481caac6e00a40cf1f2bdbf7ffb5.tar.bz2
io: Add fts64 with 64-bit time_t support
Similar to glob, fts routines passes a stat pointer that might differ of size and layout when 64-bit time API is used. Checked on i686-linux-gnu and x86_64-linux-gnu. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'include/fts.h')
-rw-r--r--include/fts.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/fts.h b/include/fts.h
index 145dce6..ea36a9b 100644
--- a/include/fts.h
+++ b/include/fts.h
@@ -1 +1,52 @@
+#ifndef _FTS_H
#include <io/fts.h>
+
+#ifndef _ISOMAC
+# if __TIMESIZE != 64
+# include <sys/stat.h>
+
+typedef struct
+{
+ struct _ftsent64_time64 *fts_cur;
+ struct _ftsent64_time64 *fts_child;
+ struct _ftsent64_time64 **fts_array;
+ dev_t fts_dev;
+ char *fts_path;
+ int fts_rfd;
+ int fts_pathlen;
+ int fts_nitems;
+ int (*fts_compar) (const void *, const void *);
+ int fts_options;
+} FTS64_TIME64;
+
+typedef struct _ftsent64_time64
+{
+ struct _ftsent64_time64 *fts_cycle;
+ struct _ftsent64_time64 *fts_parent;
+ struct _ftsent64_time64 *fts_link;
+ long fts_number;
+ void *fts_pointer;
+ char *fts_accpath;
+ char *fts_path;
+ int fts_errno;
+ int fts_symfd;
+ unsigned short fts_pathlen;
+ unsigned short fts_namelen;
+
+ ino64_t fts_ino;
+ dev_t fts_dev;
+ nlink_t fts_nlink;
+
+ short fts_level;
+ unsigned short fts_info;
+ unsigned short fts_flags;
+ unsigned short fts_instr;
+
+ struct __stat64_t64 *fts_statp;
+ char fts_name[1];
+} FSTENT64_TIME64;
+
+# endif
+#endif
+
+#endif /* _FTS_H */