diff --git a/src/core/file_unix.cpp b/src/core/file_unix.cpp index 8d60a2e..a1728da 100644 --- a/src/core/file_unix.cpp +++ b/src/core/file_unix.cpp @@ -217,10 +217,15 @@ void cFile::Open( const TSTRING& sFileNameC, uint32 flags ) cFile::Rewind(); #ifdef F_NOCACHE - if (flags & OPEN_DIRECT) + if ((flags & OPEN_DIRECT) && (flags & OPEN_SCANNING)) fcntl(fh, F_NOCACHE, 1); #endif +#ifdef __sun + if ((flags & OPEN_DIRECT) && (flags & OPEN_SCANNING)) + directio(fh, DIRECTIO_ON); +#endif + #ifdef HAVE_POSIX_FADVISE if (flags & OPEN_SCANNING) { posix_fadvise(fh,0,0, POSIX_FADV_SEQUENTIAL);