From aad54cb32cb0c0a1fbebeb5f42a2b5b094149bb4 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 5 Sep 2005 21:22:45 +0000 Subject: [PATCH] Add fsync() interface. --- lib/posix/Makefile | 4 ++++ lib/posix/_fsync.c | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 lib/posix/_fsync.c diff --git a/lib/posix/Makefile b/lib/posix/Makefile index a985633a7..0eb66ff54 100755 --- a/lib/posix/Makefile +++ b/lib/posix/Makefile @@ -34,6 +34,7 @@ OBJECTS = \ $(LIBRARY)(_fpathconf.o) \ $(LIBRARY)(_fstat.o) \ $(LIBRARY)(_fstatfs.o) \ + $(LIBRARY)(_fsync.o) \ $(LIBRARY)(_getcwd.o) \ $(LIBRARY)(_getegid.o) \ $(LIBRARY)(_geteuid.o) \ @@ -185,6 +186,9 @@ $(LIBRARY)(_fpathconf.o): _fpathconf.c $(LIBRARY)(_fstat.o): _fstat.c $(CC1) _fstat.c +$(LIBRARY)(_fsync.o): _fsync.c + $(CC1) _fsync.c + $(LIBRARY)(_fstatfs.o): _fstatfs.c $(CC1) _fstatfs.c diff --git a/lib/posix/_fsync.c b/lib/posix/_fsync.c new file mode 100755 index 000000000..86ef0a5af --- /dev/null +++ b/lib/posix/_fsync.c @@ -0,0 +1,12 @@ +#include +#define sync _sync +#include + +PUBLIC int fsync(int fd) +{ + message m; + + m.m1_i1 = fd; + + return(_syscall(FS, FSYNC, &m)); +} -- 2.44.0