actually use HAVE_FDATASYNC

This commit is contained in:
Michael Gehring
2016-01-26 14:21:40 +01:00
parent 0f56b68eac
commit 618e504d30
3 changed files with 12 additions and 0 deletions

View File

@ -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 */