Bug #81130 [NEW]: implicit declaration of function 'fdatasync' is invalid in C99

From: Date: Sat, 12 Jun 2021 14:37:11 +0000
Subject: Bug #81130 [NEW]: implicit declaration of function 'fdatasync' is invalid in C99
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234367@lists.php.net to get a copy of this message
From: php-bugs-2021 at ryandesign dot com Operating system: macOS 10.13.6 PHP version: 8.1.0alpha1 Package: Compile Failure Bug Type: Bug Bug description:implicit declaration of function 'fdatasync' is invalid in C99 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 bug report at https://bugs.php.net/bug.php?id=81130&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81130&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81130&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81130&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81130&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81130&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81130&r=support Expected behavior: https://bugs.php.net/fix.php?id=81130&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81130&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81130&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81130&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81130&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81130&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81130&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81130&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81130&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81130&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81130&r=mysqlcfg

« previous php.bugs (#234367) next »