Change shm init to PROT_WRITE, instead of PROT_READ | PROT_WRITE.

This is required for mmap to succeed on my system. YMMV.
May cause a problem with incomplete shutdown.
This commit is contained in:
Ragnvald Maartmann-Moe IV 2001-06-02 06:51:58 +00:00
parent 297f7c0567
commit 4826c5dd0f

View file

@ -1,7 +1,7 @@
/*
snd_oss.c
(description)
OSS sound plugin.
Copyright (C) 1996-1997 Id Software, Inc.
@ -196,7 +196,7 @@ SNDDMA_Init (void)
// memory map the dma buffer
shm->buffer = (unsigned char *) mmap (NULL, info.fragstotal
* info.fragsize,
PROT_READ | PROT_WRITE,
PROT_WRITE, // was also | PROT_READ
MAP_FILE | MAP_SHARED, audio_fd, 0);
if (shm->buffer == MAP_FAILED) {