actually use HAVE_FDATASYNC
This commit is contained in:
parent
0f56b68eac
commit
618e504d30
@ -954,7 +954,11 @@ main(int argc, char **argv)
|
||||
*/
|
||||
binpkg = xbps_xasprintf("%s.%s.xbps", pkgver, arch);
|
||||
|
||||
#ifdef HAVE_FDATASYNC
|
||||
(void)fdatasync(pkg_fd);
|
||||
#else
|
||||
(void)fsync(pkg_fd);
|
||||
#endif
|
||||
myumask = umask(0);
|
||||
(void)umask(myumask);
|
||||
|
||||
|
@ -86,7 +86,11 @@ repodata_flush(struct xbps_handle *xhp, const char *repodir,
|
||||
|
||||
/* Write data to tempfile and rename */
|
||||
archive_write_finish(ar);
|
||||
#ifdef HAVE_FDATASYNC
|
||||
fdatasync(repofd);
|
||||
#else
|
||||
fsync(repofd);
|
||||
#endif
|
||||
assert(fchmod(repofd, 0664) != -1);
|
||||
close(repofd);
|
||||
rename(tname, repofile);
|
||||
|
@ -87,7 +87,11 @@ xbps_pkg_exec_buffer(struct xbps_handle *xhp,
|
||||
goto out;
|
||||
}
|
||||
fchmod(fd, 0750);
|
||||
#ifdef HAVE_FDATASYNC
|
||||
fdatasync(fd);
|
||||
#else
|
||||
fsync(fd);
|
||||
#endif
|
||||
close(fd);
|
||||
|
||||
/* exec script */
|
||||
|
Loading…
Reference in New Issue
Block a user