about summary refs log tree commit diff
path: root/db2/os/os_fsync.c
diff options
context:
space:
mode:
Diffstat (limited to 'db2/os/os_fsync.c')
-rw-r--r--db2/os/os_fsync.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/db2/os/os_fsync.c b/db2/os/os_fsync.c
new file mode 100644
index 0000000000..7b001ceeb0
--- /dev/null
+++ b/db2/os/os_fsync.c
@@ -0,0 +1,34 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 1997
+ *	Sleepycat Software.  All rights reserved.
+ */
+
+#include "config.h"
+
+#ifndef lint
+static const char sccsid[] = "@(#)os_fsync.c	10.3 (Sleepycat) 10/25/97";
+#endif /* not lint */
+
+#ifndef NO_SYSTEM_INCLUDES
+#include <sys/types.h>
+
+#include <errno.h>
+#include <unistd.h>
+#endif
+
+#include "db_int.h"
+
+/*
+ * __db_fsync --
+ *	Flush a file descriptor.
+ *
+ * PUBLIC: int __db_fsync __P((int));
+ */
+int
+__db_fsync(fd)
+	int fd;
+{
+	return (__os_fsync(fd) ? errno : 0);
+}