Bug #81130 [Opn->Csd]: implicit declaration of function 'fdatasync' is invalid in C99

From: Date: Sat, 12 Jun 2021 14:42:44 +0000
Subject: Bug #81130 [Opn->Csd]: implicit declaration of function 'fdatasync' is invalid in C99
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234368@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81130&edit=1 ID: 81130 Updated by: krakjoe@php.net Reported by: php-bugs-2021 at ryandesign dot com Summary: implicit declaration of function 'fdatasync' is invalid in C99 -Status: Open +Status: Closed Type: Bug Package: Compile Failure Operating System: macOS 10.13.6 PHP Version: 8.1.0alpha1 -Assigned To: +Assigned To: krakjoe Block user comment: N Private report: N New Comment: The fix for this bug has been committed. If you are still experiencing this bug, try to check out latest source from https://github.com/php/php-src and re-test. Thank you for the report, and for helping us make PHP better. This was fixed in e69729f2ba02ddc26c70b4bd88ef86c0a2277bdc This just missed alpha 1, will be included in alpha 2 and is in master. Previous Comments: ------------------------------------------------------------------------ [2021-06-12 14:37:11] php-bugs-2021 at ryandesign dot com Description: ------------ Hi, I'm the maintainer of php in MacPorts, trying out php 8.1.0alpha1, and it does not compile for me on macOS 10.13.6 with Apple LLVM version 9.1.0 (clang-902.0.39.2) from Xcode 9.4.1. ./configure output includes: checking for fdatasync... yes However the build fails with: main/streams/plain_wrapper.c:559:11: error: implicit declaration of function 'fdatasync' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return fdatasync(fd); ^ main/streams/plain_wrapper.c:559:11: warning: this function declaration is not a prototype [-Wstrict-prototypes] 1 warning and 1 error generated. make: *** [main/streams/plain_wrapper.lo] Error 1 make: *** Waiting for unfinished jobs.... n.b. I am using CFLAGS=-Werror=implicit-function-declaration to mimic the default behavior of Xcode 12 and later. I can't find a macOS manpage for fdatasync. Searching around, some people think macOS does have fdatasync (it is mentioned in https://opensource.apple.com/source/xnu/xnu-7195.81.3/bsd/vfs/vfs_syscalls.c.auto.html for example) but just doesn't have a prototype of it in any system header, which would be a bit odd. Others suggest not trying to use fdatasync on macOS. I'm not sure what to recommend. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81130&edit=1

« previous php.bugs (#234368) next »