1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +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

@@ -43,11 +43,11 @@ void *
_dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot)
{
void *result = MAP_FAILED;
struct stat64 st;
struct __stat64_t64 st;
int fd = __open64_nocancel (file, O_RDONLY | O_CLOEXEC);
if (fd >= 0)
{
if (__fstat64 (fd, &st) >= 0)
if (__fstat64_time64 (fd, &st) >= 0)
{
*sizep = st.st_size;