summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorRichard PALO <richard@NetBSD.org>2014-11-10 17:28:59 +0100
committerMichael Stahl <mstahl@redhat.com>2014-11-11 19:44:56 +0100
commit92c5bc7d6bc9dec429114a0f72f6f5989d70f731 (patch)
tree65ac53b246c3509cf896dd2bd263c75099975b84 /sal
parent7970fa513006af45994122a0ec42486e7b32cbe6 (diff)
SOLARIS can use/should use posix_madvise under certain conditions.
Change-Id: Idc40752b4beee932b5912e6df9fe6acb15571201 Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index e9d91b42f8f9..b592151fa67f 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -1171,7 +1171,7 @@ SAL_CALL osl_mapFile (
// OS simultaneously pages in the rest); on other platforms, it remains
// to be evaluated whether madvise or equivalent is available and
// actually useful:
-#if defined MACOSX
+#if defined MACOSX || ( defined(SOLARIS) && ( !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) ) )
int e = posix_madvise(p, nLength, POSIX_MADV_WILLNEED);
if (e != 0)
{