aboutsummaryrefslogtreecommitdiff
path: root/elf/readlib.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-12-29 10:20:46 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-01-12 10:30:10 -0300
commit0b8e83eb1455f3c0332eeb1f96fbc262fbd054e0 (patch)
tree118b87b249be509983be0295e9022c15823d4e65 /elf/readlib.c
parent86bf0feb0e3ec8e37872f72499d6ae33406561d7 (diff)
downloadglibc-0b8e83eb1455f3c0332eeb1f96fbc262fbd054e0.zip
glibc-0b8e83eb1455f3c0332eeb1f96fbc262fbd054e0.tar.gz
glibc-0b8e83eb1455f3c0332eeb1f96fbc262fbd054e0.tar.bz2
elf: Fix 64 time_t support for installed statically binaries
The usage of internal static symbol for statically linked binaries does not work correctly for objects built with -D_TIME_BITS=64, since the internal definition does not provide the expected aliases. This patch makes it to use the default stat functions instead (which uses the default 64 time_t alias and types). Checked on i686-linux-gnu.
Diffstat (limited to 'elf/readlib.c')
-rw-r--r--elf/readlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/elf/readlib.c b/elf/readlib.c
index 05c1577..3651dcd 100644
--- a/elf/readlib.c
+++ b/elf/readlib.c
@@ -74,10 +74,10 @@ int
process_file (const char *real_file_name, const char *file_name,
const char *lib, int *flag, unsigned int *osversion,
unsigned int *isa_level, char **soname, int is_link,
- struct stat64 *stat_buf)
+ struct stat *stat_buf)
{
FILE *file;
- struct stat64 statbuf;
+ struct stat statbuf;
void *file_contents;
int ret;
ElfW(Ehdr) *elf_header;
@@ -97,7 +97,7 @@ process_file (const char *real_file_name, const char *file_name,
return 1;
}
- if (fstat64 (fileno (file), &statbuf) < 0)
+ if (fstat (fileno (file), &statbuf) < 0)
{
error (0, 0, _("Cannot fstat file %s.\n"), file_name);
fclose (file);