From 49714f08d35ddb83729ae2cfd3ffde6f4f2f09f1 Mon Sep 17 00:00:00 2001 From: Alexander Shursha Date: Fri, 29 Nov 2024 13:42:00 +0300 Subject: [PATCH] Fix creating of shared memory segments by specifying a writable location to store the associated file. Authored-by: Joe Marcus Clarke --- src/pulsecore/shm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c index 694f971b4..a9a321f0b 100644 --- a/src/pulsecore/shm.c +++ b/src/pulsecore/shm.c @@ -105,7 +105,11 @@ static inline size_t shm_marker_size(pa_mem_type_t type) { #ifdef HAVE_SHM_OPEN static char *segment_name(char *fn, size_t l, unsigned id) { +#ifndef __FreeBSD__ pa_snprintf(fn, l, "/pulse-shm-%u", id); +#else + pa_snprintf(fn, l, "/tmp/pulse-shm-%u", id); +#endif return fn; } #endif