--- a/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c Tue Mar 06 10:25:45 2012 +0800
+++ b/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c Tue Mar 06 20:34:38 2012 +0000
@@ -33,9 +33,24 @@
#include <sys/socket.h>
#include <fcntl.h>
#include <sys/uio.h>
+#include <unistd.h>
#include "nio.h"
#include "nio_util.h"
+#ifdef _ALLBSD_SOURCE
+#define stat64 stat
+#define flock64 flock
+#define off64_t off_t
+#define F_SETLKW64 F_SETLKW
+#define F_SETLK64 F_SETLK
+
+#define pread64 pread
+#define pwrite64 pwrite
+#define ftruncate64 ftruncate
+#define fstat64 fstat
+
+#define fdatasync fsync
+#endif
static int preCloseFD = -1; /* File descriptor to which we dup other fd's
before closing them for real */