Compare commits

...

2 commits

Author SHA1 Message Date
Niveditha Rau
752c3e742c Merge branch 'master' into 'master'
Modify Solaris shm path to accomodate for recent changes in Solaris

See merge request pulseaudio/pulseaudio!843
2025-05-06 04:03:16 +00:00
Niveditha Rau
6b010e1f42 Modify Solaris shm path to accomodate for recent changes in Solaris 2025-01-29 03:38:41 +00:00

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)