In 32-bits platform, {f,}stat on a large size file during mkfs, it will
cause EOVERFLOW error, this patch fixes to add macro definition
_FILE_OFFSET_BITS to avoid that error.Signed-off-by: Chao Yu <[email protected]> --- lib/libf2fs.c | 1 + mkfs/f2fs_format_utils.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/libf2fs.c b/lib/libf2fs.c index 8bda1fed082c..529f1caa4144 100644 --- a/lib/libf2fs.c +++ b/lib/libf2fs.c @@ -7,6 +7,7 @@ * Dual licensed under the GPL or LGPL version 2 licenses. */ #define _LARGEFILE64_SOURCE +#define _FILE_OFFSET_BITS 64 #include <f2fs_fs.h> #include <stdio.h> diff --git a/mkfs/f2fs_format_utils.c b/mkfs/f2fs_format_utils.c index 5b9cc0c6ac69..e620190df4b7 100644 --- a/mkfs/f2fs_format_utils.c +++ b/mkfs/f2fs_format_utils.c @@ -16,6 +16,10 @@ #define _GNU_SOURCE #endif +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 +#endif + #include <f2fs_fs.h> #include <stdio.h> -- 2.18.0.rc1 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
