summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-02-04 21:32:38 -0500
committerEliot Horowitz <eliot@10gen.com>2010-02-04 21:32:38 -0500
commitae5e03de122426a8d3e885afa605bb09a5eecab7 (patch)
tree67c774c636c1df3208c22b11ed72b918ea80b3bb /util
parentb2a360229b1b382e69154fc74b2c3e41fc86fc25 (diff)
downloadmongo-ae5e03de122426a8d3e885afa605bb09a5eecab7.tar.gz
fix madvise if
Diffstat (limited to 'util')
-rw-r--r--util/mmap_posix.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/mmap_posix.cpp b/util/mmap_posix.cpp
index 46dbe30f793..836373d36bc 100644
--- a/util/mmap_posix.cpp
+++ b/util/mmap_posix.cpp
@@ -79,15 +79,15 @@ namespace mongo {
}
return 0;
}
-
-#ifdef madvise
+
+#if defined(__sunos__)
+#warning madvise not supported on solaris yet
+#else
if ( options & SEQUENTIAL ){
if ( madvise( view , length , MADV_SEQUENTIAL ) ){
out() << " madvise failed for " << filename << " " << OUTPUT_ERRNO << endl;
}
}
-#else
- log() << "warning: madvise doesn't seem to exists on your platform" << endl;
#endif
return view;
}