fsync is conforming to POSIX.1-2001 says the manpage (which is correct, I checked). Though compiling code with: gcc -ansi -Wall -D_POSIX_SOURCE=1 -D_POSIX_C_SOURCE=20011200 ... does not enables fsync prototype. There is a missing guard in unistd.h that says: #if defined __USE_BSD || defined __USE_XOPEN that should be: #if defined __USE_BSD || defined __USE_XOPEN || defined __USE_XOPEN2K
AFAIK fsync is just an POSIX option and only mandatory for XSI and Realtime option group. Therefore the app IMHO needs to define either -D_XOPEN_SOURCE, -D_XOPEN_SOURCE=500 or -D_XOPEN_SOURCE=600 and that's where fsync prototype is available.
Subject: Re: fsync and POSIX.1-2001 On Sun, Apr 15, 2007 at 11:51:15AM -0000, jakub at redhat dot com wrote: > > ------- Additional Comments From jakub at redhat dot com 2007-04-15 12:51 ------- > AFAIK fsync is just an POSIX option and only mandatory for XSI and Realtime > option group. > Therefore the app IMHO needs to define either -D_XOPEN_SOURCE, > -D_XOPEN_SOURCE=500 or -D_XOPEN_SOURCE=600 and that's where fsync prototype > is available. Oh seems I read the spec too fast, it really seems you're right. You can close the bug, thanks.
invalid bug