mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-11-23 15:00:52 +07:00
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 <github@jochen.sprickerhof.de> Signed-off-by: Shengjing Zhu <shengjing.zhu@canonical.com> Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
This commit is contained in:
parent
11eb9bc67c
commit
68db675078
@ -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 <assert.h>
|
||||
#include <dirent.h>
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user