Apologies, but I had an error in my previous patch. The #if test
was reversed. Sorry about this. The attached patch is correct.
Brian
On 05/22/12 08:55 PM, Brian Cameron wrote:
I am attaching 3 patches for consideration upstream:
- pulseaudio-05-shm.diff
The shm files on Solaris end up with a different name. This patch
makes the code work on Solaris too.
- pulseaudio-07-sada.diff
Fixes to improve the SunAudio plugin so it works better.
- pulsaudio-10-endian.diff
On Sparc, WORDS_BIGENDIAN needs to get set if _BIG_ENDIAN is set.
Brian
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
--- pulseaudio-1.1/src/pulsecore/shm.c-orig 2011-10-24 19:42:44.692685416
-0500
+++ pulseaudio-1.1/src/pulsecore/shm.c 2011-10-24 20:24:30.605598557 -0500
@@ -68,8 +68,13 @@
* /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
#else
#undef SHM_PATH
+#define SHM_ID_LEN 0
#endif
#define SHM_MARKER ((int) 0xbeefcafe)
@@ -359,10 +364,14 @@ int pa_shm_cleanup(void) {
char fn[128];
struct shm_marker *m;
- if (strncmp(de->d_name, "pulse-shm-", 10))
+#ifdef 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 + 10, &id) < 0)
+ if (pa_atou(de->d_name + SHM_ID_LEN, &id) < 0)
continue;
if (pa_shm_attach_ro(&seg, id) < 0)
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss