From: Shengjing Zhu Date: Thu, 18 Apr 2024 14:29:51 +0000 (+0800) Subject: testsuite: wrap _{l,}stat64_time64 in test X-Git-Tag: v33~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68db6750788931da26018f2ee5c635cd58a4d809;p=thirdparty%2Fkmod.git testsuite: wrap _{l,}stat64_time64 in test Fix building with -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 on 32bit arch. Closes: https://github.com/kmod-project/kmod/issues/37 Bug: https://bugs.debian.org/1065973 Co-authored-by: Jochen Sprickerhof Signed-off-by: Shengjing Zhu Signed-off-by: Lucas De Marchi --- diff --git a/testsuite/path.c b/testsuite/path.c index 5a291b1b..00935fb5 100644 --- a/testsuite/path.c +++ b/testsuite/path.c @@ -18,6 +18,7 @@ /* We unset _FILE_OFFSET_BITS here so we can override both stat and stat64 on * 32-bit architectures and forward each to the right libc function */ #undef _FILE_OFFSET_BITS +#undef _TIME_BITS #include #include @@ -202,8 +203,14 @@ WRAP_2ARGS(int, -1, stat, struct stat*); WRAP_2ARGS(int, -1, lstat, struct stat*); WRAP_2ARGS(int, -1, stat64, struct stat64*); WRAP_2ARGS(int, -1, lstat64, struct stat64*); -WRAP_OPEN(64); +struct __stat64_t64; +extern int __stat64_time64 (const char *file, struct __stat64_t64 *buf); +extern int __lstat64_time64 (const char *file, struct __stat64_t64 *buf); +WRAP_2ARGS(int, -1, __stat64_time64, struct __stat64_t64*); +WRAP_2ARGS(int, -1, __lstat64_time64, struct __stat64_t64*); + +WRAP_OPEN(64); WRAP_OPEN(); #ifdef HAVE___XSTAT