aboutsummaryrefslogtreecommitdiff
path: root/elf/chroot_canon.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/chroot_canon.c
parent86bf0feb0e3ec8e37872f72499d6ae33406561d7 (diff)
downloadglibc-0b8e83eb1455f3c0332eeb1f96fbc262fbd054e0.tar.xz
glibc-0b8e83eb1455f3c0332eeb1f96fbc262fbd054e0.zip
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/chroot_canon.c')
-rw-r--r--elf/chroot_canon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/elf/chroot_canon.c b/elf/chroot_canon.c
index c7f12ca112..e5d7518266 100644
--- a/elf/chroot_canon.c
+++ b/elf/chroot_canon.c
@@ -67,7 +67,7 @@ chroot_canon (const char *chroot, const char *name)
for (start = end = name; *start; start = end)
{
- struct stat64 st;
+ struct stat st;
/* Skip sequence of multiple path-separators. */
while (*start == '/')
@@ -114,7 +114,7 @@ chroot_canon (const char *chroot, const char *name)
dest = mempcpy (dest, start, end - start);
*dest = '\0';
- if (lstat64 (rpath, &st) < 0)
+ if (lstat (rpath, &st) < 0)
{
if (*end == '\0')
goto done;