From 4e7ebfac9a92a05236459fddb3a8e24ab0688317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Thu, 29 Aug 2024 00:34:04 +1000 Subject: [PATCH] Add fdatasync declaration on darwin (#496) --- configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4946008..879ad15 100644 --- a/configure.ac +++ b/configure.ac @@ -432,7 +432,15 @@ while : ; do case ${file_sync} in fdatasync) test "x${ac_cv_func_fdatasync}" = "xno" || break - file_sync=fsync;; + file_sync=fsync + + dnl Darwin provides the function but doesn't have it in headers + case "$host_os" in + darwin*) + AH_BOTTOM([int fdatasync(int fildes);]) + ;; + esac + ;; fsync) test "x${ac_cv_func_fsync}" = "xno" || break file_sync=;;