summaryrefslogtreecommitdiff
path: root/pico/osdep/fsync.c
diff options
context:
space:
mode:
authorEduardo Chappa <echappa@gmx.com>2013-02-03 00:59:38 -0700
committerEduardo Chappa <echappa@gmx.com>2013-02-03 00:59:38 -0700
commit094ca96844842928810f14844413109fc6cdd890 (patch)
treee60efbb980f38ba9308ccb4fb2b77b87bbc115f3 /pico/osdep/fsync.c
downloadalpine-094ca96844842928810f14844413109fc6cdd890.tar.xz
Initial Alpine Version
Diffstat (limited to 'pico/osdep/fsync.c')
-rw-r--r--pico/osdep/fsync.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/pico/osdep/fsync.c b/pico/osdep/fsync.c
new file mode 100644
index 00000000..14a15d29
--- /dev/null
+++ b/pico/osdep/fsync.c
@@ -0,0 +1,31 @@
+/*
+ * Program: File sync emulator
+ *
+ * ========================================================================
+ * Copyright 2006 University of Washington
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ========================================================================
+ */
+
+#include <system.h>
+
+
+#ifndef HAVE_FSYNC
+/* Emulator for BSD fsync() call
+ * Accepts: file name
+ * Returns: 0 if successful, -1 if failure
+ */
+int
+our_fsync(int fd)
+{
+ sync();
+ return 0;
+}
+#endif /* !HAVE_FSYNC */
+