mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 18:31:27 +00:00
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:
parent
297f7c0567
commit
4826c5dd0f
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue