mkfs.f2fs: support formating large size file in 32-bits platform
PATCH 1/1 mkfs.f2fs: support formating large size file in 32-bits platform
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(+)
lib/libf2fs.c +1 -0
@@ -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>
mkfs/f2fs_format_utils.c +4 -0
@@ -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>
Signature · 1 line
2.18.0.rc1