1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

Use 64 bit time_t stat internally

For the legacy ABI with supports 32-bit time_t it calls the 64-bit
time directly, since the LFS symbols calls the 64-bit time_t ones
internally.

Checked on i686-linux-gnu and x86_64-linux-gnu.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
Adhemerval Zanella
2021-03-02 17:06:02 -03:00
parent a318262bc0
commit 52a5fe70a2
35 changed files with 106 additions and 109 deletions

View File

@@ -65,9 +65,10 @@ distinguish_extX (const struct statfs *fsbuf, const char *file, int fd)
{
char buf[64];
char path[PATH_MAX];
struct stat64 st;
struct __stat64_t64 st;
if ((file == NULL ? __fstat64 (fd, &st) : __stat64 (file, &st)) != 0)
if ((file == NULL ? __fstat64_time64 (fd, &st)
: __stat64_time64 (file, &st)) != 0)
/* Strange. The statfd call worked, but stat fails. Default to
the more pessimistic value. */
return EXT2_LINK_MAX;