[Packages] ipv6/babel: Update to 0.9 (closes: #3143)
[openwrt/svn-archive/archive.git] / sound / pulseaudio / patches / 002-shm_unlink.patch
1 diff -urN pulseaudio-0.9.7/src/pulsecore/shm.c pulseaudio-0.9.7.new/src/pulsecore/shm.c
2 --- pulseaudio-0.9.7/src/pulsecore/shm.c 2007-10-28 20:13:53.000000000 +0100
3 +++ pulseaudio-0.9.7.new/src/pulsecore/shm.c 2007-12-09 19:25:03.000000000 +0100
4 @@ -167,7 +167,7 @@
5
6 fail:
7
8 -#ifdef HAVE_SHM_OPEN
9 +#ifdef HAVE_SHM_UNLINK
10 if (fd >= 0) {
11 shm_unlink(fn);
12 pa_close(fd);
13 @@ -196,7 +196,7 @@
14 pa_xfree(m->ptr);
15 #endif
16 } else {
17 -#ifdef HAVE_SHM_OPEN
18 +#ifdef HAVE_SHM_UNLINK
19 if (munmap(m->ptr, m->size) < 0)
20 pa_log("munmap() failed: %s", pa_cstrerror(errno));
21
22 @@ -370,8 +370,10 @@
23 /* Ok, the owner of this shms segment is dead, so, let's remove the segment */
24 segment_name(fn, sizeof(fn), id);
25
26 +#ifdef HAVE_SHM_UNLINK
27 if (shm_unlink(fn) < 0 && errno != EACCES)
28 pa_log_warn("Failed to remove SHM segment %s: %s\n", fn, pa_cstrerror(errno));
29 +#endif
30 }
31
32 closedir(d);