Page MenuHomePhabricator

util: use HAVE_FDATASYNC to determine fdatasync() use
ClosedPublic

Authored by PiRK on Sep 7 2021, 09:18.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC89fed9b66d97: util: use HAVE_FDATASYNC to determine fdatasync() use
Summary

Rather than just using it on Linux and NetBSD, use fdatasync() based
on whether it's available. i.e it is available in newer versions
of FreeBSD (11.1 and later).

This also aligns our code more closely with what is being done in leveldb.

Was pointed out by Luke in #19430.

This is a backport of core#19614

Test Plan

ninja all check-all