From: Jan Kara Date: Wed, 7 Jun 2017 13:31:14 +0000 (+0200) Subject: libext2fs: fix fsync(2) detection X-Git-Tag: v1.44.0-rc1~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=474f67a968ff3b2123b149002c2f5b517c7c654c;p=thirdparty%2Fe2fsprogs.git libext2fs: fix fsync(2) detection For some reason lib/config.h.in was missing a definition of HAVE_FSYNC and as a result lib/config.h never had HAVE_FSYNC defined. As a result we never called fsync(2) for example from lib/ext2fs/unix_io.c:unix_flush() when we finished creating filesystem and could miss IO errors happening during creating of the filesystem. Test generic/405 exposes this problem. Fix the problem by defining HAVE_FSYNC in lib/config.h.in. Fixes: f47f31958578 Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o --- diff --git a/lib/config.h.in b/lib/config.h.in index 37d0c4613..91e869e7d 100644 --- a/lib/config.h.in +++ b/lib/config.h.in @@ -470,6 +470,9 @@ /* Define to 1 if you have the `sync_file_range' function. */ #undef HAVE_SYNC_FILE_RANGE +/* Define to 1 if you have the 'fsync' function. */ +#undef HAVE_FSYNC + /* Define to 1 if you have the `sysconf' function. */ #undef HAVE_SYSCONF