Print

Print


Hi Alden,

   this seems to be fixed in the git HEAD. At least it compiles just
fine on my 10.6.4 Mac Book. Could you please check if it works for you
as well? You can get the snapshot from the git repo:

   git clone http://xrootd.org//repo/xrootd.git

Cheers,
   Lukasz

On Sat, Sep 18, 2010 at 8:00 AM, Alden Stradling
<[log in to unmask]> wrote:
> 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
>
>
>
>