HomePhabricator

util: use HAVE_FDATASYNC to determine fdatasync() use

Description

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

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D10060

Details

Provenance
fanquake <fanquake@gmail.com>Authored on Jul 28 2020, 11:55
PiRKCommitted on Sep 7 2021, 13:51
PiRKPushed on Sep 7 2021, 13:51
Reviewer
Restricted Project
Differential Revision
D10060: util: use HAVE_FDATASYNC to determine fdatasync() use
Parents
rABC100e3ff738e9: Preserve the LockData initial state if "potential deadlock detected" exception…
Branches
Unknown
Tags
Unknown