summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sound-file-stream.c
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2007-09-10 11:35:30 +0000
committerPierre Ossman <ossman@cendio.se>2007-09-10 11:35:30 +0000
commitd9b3c0eef2ba256b4e1e694c3828d1f4713ebf68 (patch)
treee13d35cda623880f75d2e18db4cc9d03bbb8af42 /src/pulsecore/sound-file-stream.c
parent9630e8df575ff35cab9bc95151fcbb3d56fb29fd (diff)
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
Diffstat (limited to 'src/pulsecore/sound-file-stream.c')
-rw-r--r--src/pulsecore/sound-file-stream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c
index 36c7f03c..d5523a64 100644
--- a/src/pulsecore/sound-file-stream.c
+++ b/src/pulsecore/sound-file-stream.c
@@ -255,6 +255,7 @@ int pa_play_file(
* file reader into the main event loop and pass the data over the
* asyncmsgq. */
+#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 fail;
@@ -266,6 +267,7 @@ int pa_play_file(
goto fail;
} else
pa_log_debug("POSIX_FADV_WILLNEED succeeded.");
+#endif
if (!(u->sndfile = sf_open_fd(fd, SFM_READ, &sfinfo, 1))) {
pa_log("Failed to open file %s", fname);