about summary refs log tree commit diff
path: root/include/ftw.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-03 09:36:18 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-15 10:42:11 -0300
commit19873b18b08c97be8bf370398f6dff2b3472f52f (patch)
tree001e050d198a0cb021b4f2ca006898c7ec1b6c09 /include/ftw.h
parent70961aee1823481caac6e00a40cf1f2bdbf7ffb5 (diff)
downloadglibc-19873b18b08c97be8bf370398f6dff2b3472f52f.tar.gz
glibc-19873b18b08c97be8bf370398f6dff2b3472f52f.tar.xz
glibc-19873b18b08c97be8bf370398f6dff2b3472f52f.zip
io: Add ftw64 with 64-bit time_t support
Similar to fts, ftw 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/ftw.h')
-rw-r--r--include/ftw.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/ftw.h b/include/ftw.h
index 4fb654cf22..8fb89c4046 100644
--- a/include/ftw.h
+++ b/include/ftw.h
@@ -1 +1,19 @@
+#ifndef _FTW_H
 #include <io/ftw.h>
+
+#ifndef _ISOMAC
+# if __TIMESIZE != 64
+#  include <sys/stat.h>
+
+typedef int (*__ftw64_time64_func_t) (const char *,
+				      const struct __stat64_t64 *, int);
+typedef int (*__nftw64_time64_func_t) (const char *,
+				       const struct __stat64_t64 *, int,
+				       struct FTW *);
+
+extern int __ftw64_time64 (const char *, __ftw64_time64_func_t, int);
+extern int __nftw64_time64 (const char *, __nftw64_time64_func_t, int, int);
+# endif
+#endif
+
+#endif /* _FTW_H  */