Page MenuHomePhabricator

Bugfix: Define and use HAVE_FDATASYNC correctly outside LevelDB
DraftPublic

Authored by PiRK on Sep 16 2021, 15:37.
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

Fixes a bug introduced in #19614 (D10060)

The LevelDB-specific fdatasync check was only using AC_SUBST, which works for Makefiles, but doesn't define anything for C++. Furthermore, the #define is typically 0 or 1, never undefined.

This fixes both issues by defining it and checking its value instead of whether it is merely defined.

This is a backport of core#19803

Test Plan

ninja all check-all