From e69729f2ba02ddc26c70b4bd88ef86c0a2277bdc Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Wed, 9 Jun 2021 02:51:10 +0100 Subject: [PATCH] fdatasync disable warning on macOS. (#7122) The symbol exists and picked up but nowhere to be found on the headers. tested on gcc/clang from homebrew and clang/Xcode. --- main/streams/plain_wrapper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index fcb724bdb8c..bc7cf2f8ef9 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -60,6 +60,9 @@ extern int php_get_gid_by_name(const char *name, gid_t *gid); # define PLAIN_WRAP_BUF_SIZE(st) (st) # if !defined(HAVE_FDATASYNC) # define fdatasync fsync +# elif defined(__APPLE__) + // The symbol is present, however not in the headers + extern int fdatasync(int); # endif #endif