2 Copyright © 2004-2007, The AROS Development Team. All rights reserved.
5 POSIX function fsync().
8 #include <exec/types.h>
9 #include <dos/dosextens.h>
10 #include <proto/exec.h>
11 #include <proto/dos.h>
15 /*****************************************************************************
43 ******************************************************************************/
45 fdesc
*fdesc
= __getfdesc(fd
);
47 if (!fdesc
|| !(fdesc
->fcb
->flags
& O_WRITE
))
53 if (!Flush((BPTR
) fdesc
->fcb
->fh
))
55 errno
= IoErr2errno(IoErr());