pkgsrc/audio/pulseaudio/patches/patch-ag
wiz 6a630094d0 Add comments to most patches.
Also add a patch by drochner:
pthread_key_create returns 0 on success; return values on failure are
not defined.

Remaining patches without comments:
patch-ab: adding an ifdef notyet in src/daemon/main.c
patch-a{c,e}: --start -> -D (no idea why)
patch-af: allow some Linux-only code also on NetBSD
2011-05-21 15:32:59 +00:00

25 lines
948 B
Text

$NetBSD: patch-ag,v 1.3 2011/05/21 15:33:00 wiz Exp $
shm_open takes a path on NetBSD; pa_shm_create_rw needs write
permissions, so +w the shared memory when creating it.
--- src/pulsecore/shm.c.orig 2010-02-01 14:21:15.000000000 +0000
+++ src/pulsecore/shm.c
@@ -91,7 +91,7 @@ struct shm_marker {
#define SHM_MARKER_SIZE PA_ALIGN(sizeof(struct shm_marker))
static char *segment_name(char *fn, size_t l, unsigned id) {
- pa_snprintf(fn, l, "/pulse-shm-%u", id);
+ pa_snprintf(fn, l, "/tmp/pulse-shm-%u", id);
return fn;
}
@@ -142,7 +142,7 @@ int pa_shm_create_rw(pa_shm *m, size_t s
pa_random(&m->id, sizeof(m->id));
segment_name(fn, sizeof(fn), m->id);
- if ((fd = shm_open(fn, O_RDWR|O_CREAT|O_EXCL, mode & 0444)) < 0) {
+ if ((fd = shm_open(fn, O_RDWR|O_CREAT|O_EXCL, mode & 0644)) < 0) {
pa_log("shm_open() failed: %s", pa_cstrerror(errno));
goto fail;
}