Print

Print


So fdatasync is nonexistent on OS X, and the precompiler is told to treat it as just fsync

#ifdef __macos__
...
src/XrdSys/XrdSysPlatform.hh:#define fdatasync(x) fsync(x)

BUT, the compiler in 10.6 seems to hate the fact that fsync is double-defined.

XrdPosixPreload.cc: In function 'int fsync(int)':
XrdPosixPreload.cc:265: error: redefinition of 'int fsync(int)'
XrdPosixPreload.cc:159: error: 'int fsync(int)' previously defined here


To work around it, commented out the lines

(line 161 or so)
/*
extern "C"
{
int     fdatasync(int fildes)
{
   static int Init = Xunix.Init(&Init);

   return XrdPosix_Fdatasync(fildes);
}
}
*/

and got the build to work again. This looks like it needs to be precompiler-wrapped.

Running off the dev version posted on the web page (20100315-1007)

Cheers,

Alden