diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c index 9514dfd75c..9a71d13d57 100644 --- a/src/nwfilter/nwfilter_dhcpsnoop.c +++ b/src/nwfilter/nwfilter_dhcpsnoop.c @@ -1772,7 +1772,7 @@ virNWFilterSnoopLeaseFileWrite(int lfd, const char *ifkey, goto cleanup; } - ignore_value(fsync(lfd)); + ignore_value(g_fsync(lfd)); cleanup: VIR_FREE(lbuf); diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index f2d8810813..c1a6b44f4b 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -384,7 +384,7 @@ createRawFile(int fd, virStorageVolDefPtr vol, } } - if (fsync(fd) < 0) { + if (g_fsync(fd) < 0) { ret = -errno; virReportSystemError(errno, _("cannot sync data to file '%s'"), vol->target.path); diff --git a/src/util/virfile.c b/src/util/virfile.c index 0f0d607c59..1784895575 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -519,7 +519,7 @@ virFileRewrite(const char *path, goto cleanup; } - if (fsync(fd) < 0) { + if (g_fsync(fd) < 0) { virReportSystemError(errno, _("cannot sync file '%s'"), newfile); goto cleanup;