From 6b010e1f42789c817771a16a8a3ff558fa0f98b8 Mon Sep 17 00:00:00 2001 From: Niveditha Rau Date: Wed, 29 Jan 2025 03:38:41 +0000 Subject: [PATCH] Modify Solaris shm path to accomodate for recent changes in Solaris --- src/pulsecore/shm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c index 694f971b4..3235393b3 100644 --- a/src/pulsecore/shm.c +++ b/src/pulsecore/shm.c @@ -62,16 +62,15 @@ /* 1 GiB at max */ #define MAX_SHM_SIZE (PA_ALIGN(1024*1024*1024)) +#define SHM_ID_LEN 10 #ifdef __linux__ /* On Linux we know that the shared memory blocks are files in * /dev/shm. We can use that information to list all blocks and * cleanup unused ones */ #define SHM_PATH "/dev/shm/" -#define SHM_ID_LEN 10 #elif defined(__sun) -#define SHM_PATH "/tmp" -#define SHM_ID_LEN 15 +#define SHM_PATH "/tmp/.LIBRT/SHM" #else #undef SHM_PATH #undef SHM_ID_LEN @@ -450,11 +449,7 @@ int pa_shm_cleanup(void) { char fn[128]; struct shm_marker *m; -#if defined(__sun) - if (strncmp(de->d_name, ".SHMDpulse-shm-", SHM_ID_LEN)) -#else if (strncmp(de->d_name, "pulse-shm-", SHM_ID_LEN)) -#endif continue; if (pa_atou(de->d_name + SHM_ID_LEN, &id) < 0)