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)