From a49c286214ca580ae1471b9ba0a73b207c2fe4bf Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 27 Aug 2024 10:41:33 +0200 Subject: [PATCH] Better wrapping of legacy stat/fstat/lstat using stat64 this time --- src/wrapped/wrappedlibc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index b9bd0295..5ae54fa3 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -1253,25 +1253,25 @@ static int FillStatFromStat64(int vers, const struct stat64 *st64, void *st32) EXPORT int my_stat(char* path, void* buf) { - struct stat st; - int r = stat(path, &st); - UnalignStat(&st, buf); + struct stat64 st; + int r = stat64(path, &st); + FillStatFromStat64(3, &st, buf); return r; } EXPORT int my_fstat(int fd, void* buf) { - struct stat st; - int r = fstat(fd, &st); - UnalignStat(&st, buf); + struct stat64 st; + int r = fstat64(fd, &st); + FillStatFromStat64(3, &st, buf); return r; } EXPORT int my_lstat(char* path, void* buf) { - struct stat st; - int r = lstat(path, &st); - UnalignStat(&st, buf); + struct stat64 st; + int r = lstat64(path, &st); + FillStatFromStat64(3, &st, buf); return r; }