aboutsummaryrefslogtreecommitdiff
path: root/libjava/include/posix.h
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/include/posix.h')
-rw-r--r--libjava/include/posix.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libjava/include/posix.h b/libjava/include/posix.h
index ad93753..100333c 100644
--- a/libjava/include/posix.h
+++ b/libjava/include/posix.h
@@ -48,6 +48,15 @@ details. */
#define _Jv_platform_solib_suffix ".so"
#endif
+// Some POSIX systems don't have O_SYNC and O_DYSNC so we define them here.
+// Needed in java/io/natFileDescriptorPosix.cc.
+#if !defined (O_SYNC) && defined (O_FSYNC)
+#define O_SYNC O_FSYNC
+#endif
+#if !defined (O_DSYNC) && defined (O_FSYNC)
+#define O_DSYNC O_FSYNC
+#endif
+
// Separator for file name components.
#define _Jv_platform_file_separator ((jchar) '/')
// Separator for path components.