Modify Solaris shm path to accomodate for recent changes in Solaris

This commit is contained in:
Niveditha Rau 2025-01-29 03:38:41 +00:00
parent 3e2bb8a1ec
commit 6b010e1f42

View file

@ -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)