2 Copyright © 2004-2012, The AROS Development Team. All rights reserved.
5 POSIX.1-2008 function fsync().
8 #include <exec/types.h>
9 #include <dos/dosextens.h>
10 #include <proto/exec.h>
11 #include <proto/dos.h>
16 /*****************************************************************************
42 ******************************************************************************/
44 fdesc
*fdesc
= __getfdesc(fd
);
46 if (!fdesc
|| !(fdesc
->fcb
->flags
& O_WRITE
))
52 if (!Flush(fdesc
->fcb
->handle
))
54 errno
= __stdc_ioerr2errno(IoErr());