summaryrefslogtreecommitdiff
path: root/java/jdk15/files/patch-j2se::io::io_util.h
blob: 0230858c006cc6ddb64e788382e6b6c1ee3bcf57 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$FreeBSD$

--- ../../j2se/src/share/native/java/io/io_util.h	8 Nov 2004 22:27:35 -0000	1.1.1.1
+++ ../../j2se/src/share/native/java/io/io_util.h	7 Sep 2006 19:40:19 -0000
@@ -11,7 +11,15 @@
 extern jfieldID IO_fd_fdID;
 extern jfieldID IO_handle_fdID;
 
-#if !defined(O_DSYNC) || !defined(O_SYNC)
+#ifdef _ALLBSD_SOURCE
+#include <fcntl.h>
+#ifndef O_SYNC
+#define O_SYNC  O_FSYNC
+#endif
+#ifndef O_DSYNC
+#define O_DSYNC O_FSYNC
+#endif
+#elif !defined(O_DSYNC) || !defined(O_SYNC)
 #define O_SYNC  (0x0800)
 #define O_DSYNC (0x2000)
 #endif