Opened 6 months ago

Closed 6 months ago

#70070 closed defect (fixed)

zix @0.4.2: error: call to undeclared function 'fdatasync'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: herbygillot (Herby Gillot)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: tiger leopard snowleopard lion mountainlion mavericks yosemite elcapitan sierra highsierra haspatch Cc:
Port: zix

Description

https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/235441/steps/install-port/logs/stdio

../zix-0.4.2/src/posix/filesystem_posix.c:61:56: error: call to undeclared function 'fdatasync'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  const ZixStatus st0 = zix_posix_status(dst_fd >= 0 ? fdatasync(dst_fd) : 0);
                                                       ^
1 error generated.

fdatasync exists on older macOS versions but is not advertised in the headers. Here is the PHP bug about this and how they fixed it (by declaring it).

Change History (2)

comment:1 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: tiger leopard snowleopard lion mountainlion mavericks yosemite elcapitan sierra haspatch added

comment:2 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 552558f177c785f978b5863457e8235a279ad963/macports-ports (master):

zix: Avoid fdatasync on macOS

Closes: #70070

Note: See TracTickets for help on using tickets.