+static void
+call_posix_fadvise (int fd UNUSED,
+ off_t offset UNUSED, off_t len UNUSED,
+ int advice UNUSED)
+{
+#ifdef HAVE_VALGRIND_VALGRIND_H
+ /* Valgrind doesn't know about posix_fadvise() as of this
+ writing. */
+ if (RUNNING_ON_VALGRIND)
+ return;
+#endif
+
+#ifdef HAVE_POSIX_FADVISE
+ posix_fadvise (fd, offset, len, advice);
+#endif
+}
+