posix_madvise and posix_fadvise aren't present on all systems.

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1783 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Pierre Ossman 2007-09-10 11:35:30 +00:00
parent 9630e8df57
commit d9b3c0eef2
4 changed files with 11 additions and 5 deletions

View file

@ -67,11 +67,13 @@ int pa_sound_file_load(
goto finish;
}
#ifdef HAVE_POSIX_FADVISE
if (posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL) < 0) {
pa_log_warn("POSIX_FADV_SEQUENTIAL failed: %s", pa_cstrerror(errno));
goto finish;
} else
pa_log_debug("POSIX_FADV_SEQUENTIAL succeeded.");
#endif
if (!(sf = sf_open_fd(fd, SFM_READ, &sfinfo, 1))) {
pa_log("Failed to open file %s", fname);