aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTaylor Holberton <tay10r@protonmail.com>2020-06-03 09:42:23 -0400
committerGitHub <noreply@github.com>2020-06-03 09:42:23 -0400
commit102f06d85c60e0ac52d755fbdd8d3f8531f5e3d5 (patch)
tree01771e7e73ca4a50070ef7c766580b024225c753 /src
parent60dfa38cc34de061d6e8938528132b838d7ec696 (diff)
parentf317464b8a1567410ceb4191f47b4e0eec320447 (diff)
Merge pull request #158 from E5ten/no-map_file
src/pcm.c: remove MAP_FILE mmap flag
Diffstat (limited to 'src')
-rw-r--r--src/pcm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pcm.c b/src/pcm.c
index 98c266c..ac82042 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -405,7 +405,7 @@ int pcm_set_config(struct pcm *pcm, const struct pcm_config *config)
if (pcm->flags & PCM_MMAP) {
pcm->mmap_buffer = mmap(NULL, pcm_frames_to_bytes(pcm, pcm->buffer_size),
- PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, pcm->fd, 0);
+ PROT_READ | PROT_WRITE, MAP_SHARED, pcm->fd, 0);
if (pcm->mmap_buffer == MAP_FAILED) {
int errno_copy = errno;
oops(pcm, errno, "failed to mmap buffer %d bytes\n",
@@ -544,7 +544,7 @@ static int pcm_hw_mmap_status(struct pcm *pcm)
return 0;
int page_size = sysconf(_SC_PAGE_SIZE);
- pcm->mmap_status = mmap(NULL, page_size, PROT_READ, MAP_FILE | MAP_SHARED,
+ pcm->mmap_status = mmap(NULL, page_size, PROT_READ, MAP_SHARED,
pcm->fd, SNDRV_PCM_MMAP_OFFSET_STATUS);
if (pcm->mmap_status == MAP_FAILED)
pcm->mmap_status = NULL;
@@ -552,7 +552,7 @@ static int pcm_hw_mmap_status(struct pcm *pcm)
goto mmap_error;
pcm->mmap_control = mmap(NULL, page_size, PROT_READ | PROT_WRITE,
- MAP_FILE | MAP_SHARED, pcm->fd, SNDRV_PCM_MMAP_OFFSET_CONTROL);
+ MAP_SHARED, pcm->fd, SNDRV_PCM_MMAP_OFFSET_CONTROL);
if (pcm->mmap_control == MAP_FAILED)
pcm->mmap_control = NULL;
if (!pcm->mmap_control) {