Subject: Re: bug#9141: Coreutils Compiler Warnings on OSX 10.7 (Lion)

From: Paul Eggert <[email-masked]>
Date: Thu, 21 Jul 2011 15:08:14 -0700

On 07/21/11 02:16, Herb Wartens wrote:
> OSX does have fdatasync defined as part of the libsystem_kernel.dylib library.
> The problem is that there is no header on OSX that actually provides the function.

Thanks again for reporting this.

What is the exact symptom of failure here?
If 'configure' successfully linked to fdatasync, then
presumably coreutils can link to it too.  So presumably
your compiler complained about the missing declaration.
But did it go ahead and use fdatasync anyway?  If so,
we're done: you can just ignore the diagnostic.  If not,
perhaps 'configure' should check that fdatasync is declared
(and not just linkable too), and use fdatasync only if it
is declared; that would be more-conservative.

Have you checked, via "grep -r fdatasync /usr/include/", whether
fdatasync is actually present anywhere?  It might be declared only
if some other symbol is #define'd, in which case, we should find
out what that is and #define it.