* configure.ac: Check for statx(), available on glibc >= 2.28.
* src/stat.c (get_birthtime): Call statx() when available.
* NEWS: Mention the improvement.
stat and tail now know about the "sdcardfs" file system on Android.
stat -f -c%T now reports the file system type, and tail -f uses inotify.
+ stat now prints file creation time when supported by the file system,
+ on GNU Linux systems with glibc >= 2.28 and kernel >= 4.11.
+
* Noteworthy changes in release 8.30 (2018-07-01) [stable]
AC_SUBST([LIB_NVPAIR])
fi
+# glibc >= 2.28 and linux kernel >= 4.11
+AC_CHECK_FUNCS([statx])
+
# SCO-ODT-3.0 is reported to need -los to link programs using initgroups
AC_CHECK_FUNCS([initgroups])
if test $ac_cv_func_initgroups = no; then
}
#endif
+#if HAVE_STATX
+ if (ts.tv_nsec < 0)
+ {
+ struct statx stx;
+ if ((fd < 0
+ ? statx (AT_FDCWD, filename,
+ follow_links ? 0 : AT_SYMLINK_NOFOLLOW,
+ STATX_BTIME, &stx)
+ : statx (fd, "", AT_EMPTY_PATH, STATX_BTIME, &stx)) == 0)
+ {
+ if ((stx.stx_mask & STATX_BTIME) && stx.stx_btime.tv_sec != 0)
+ {
+ ts.tv_sec = stx.stx_btime.tv_sec;
+ ts.tv_nsec = stx.stx_btime.tv_nsec;
+ }
+ }
+ }
+#endif
+
return ts;
}