1 |
ford_prefect 12/07/05 14:22:12 |
2 |
|
3 |
Added: pulseaudio-2.0-udev-symbols.patch |
4 |
Log: |
5 |
Add fix for building against udev >= 183. Also drop 2.0 since it is superceded by 2.0-r1 and above. |
6 |
|
7 |
(Portage version: 2.2.0_alpha112/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-sound/pulseaudio/files/pulseaudio-2.0-udev-symbols.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/pulseaudio/files/pulseaudio-2.0-udev-symbols.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/pulseaudio/files/pulseaudio-2.0-udev-symbols.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: pulseaudio-2.0-udev-symbols.patch |
16 |
=================================================================== |
17 |
From 2e64edbd3e12145950ccd952bb7984a4420b8c02 Mon Sep 17 00:00:00 2001 |
18 |
From: Marc-Antoine Perennou <Marc-Antoine@××××××××.com> |
19 |
Date: Thu, 17 May 2012 22:50:22 +0200 |
20 |
Subject: [PATCH] udev: Don't use deprecated udev_get_*_path() functions |
21 |
|
22 |
[These symbols were removed in libudev.so.1.0.0. Replace them with |
23 |
hardcoded strings. -- heftig] |
24 |
|
25 |
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@××××××××.com> |
26 |
--- |
27 |
src/modules/module-udev-detect.c | 9 +++------ |
28 |
src/modules/udev-util.c | 4 ++-- |
29 |
2 files changed, 5 insertions(+), 8 deletions(-) |
30 |
|
31 |
diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c |
32 |
index 1192194..31416bd 100644 |
33 |
--- a/src/modules/module-udev-detect.c |
34 |
+++ b/src/modules/module-udev-detect.c |
35 |
@@ -123,7 +123,7 @@ static char *card_get_sysattr(const char *card_idx, const char *name) { |
36 |
goto finish; |
37 |
} |
38 |
|
39 |
- t = pa_sprintf_malloc("%s/class/sound/card%s", udev_get_sys_path(udev), card_idx); |
40 |
+ t = pa_sprintf_malloc("/sys/class/sound/card%s", card_idx); |
41 |
card = udev_device_new_from_syspath(udev, t); |
42 |
pa_xfree(t); |
43 |
|
44 |
@@ -282,7 +282,7 @@ static void verify_access(struct userdata *u, struct device *d) { |
45 |
pa_assert(u); |
46 |
pa_assert(d); |
47 |
|
48 |
- cd = pa_sprintf_malloc("%s/snd/controlC%s", udev_get_dev_path(u->udev), path_get_card_id(d->path)); |
49 |
+ cd = pa_sprintf_malloc("/dev/snd/controlC%s", path_get_card_id(d->path)); |
50 |
accessible = access(cd, R_OK|W_OK) >= 0; |
51 |
pa_log_debug("%s is accessible: %s", cd, pa_yes_no(accessible)); |
52 |
|
53 |
@@ -621,7 +621,6 @@ fail: |
54 |
} |
55 |
|
56 |
static int setup_inotify(struct userdata *u) { |
57 |
- char *dev_snd; |
58 |
int r; |
59 |
|
60 |
if (u->inotify_fd >= 0) |
61 |
@@ -632,9 +631,7 @@ static int setup_inotify(struct userdata *u) { |
62 |
return -1; |
63 |
} |
64 |
|
65 |
- dev_snd = pa_sprintf_malloc("%s/snd", udev_get_dev_path(u->udev)); |
66 |
- r = inotify_add_watch(u->inotify_fd, dev_snd, IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF); |
67 |
- pa_xfree(dev_snd); |
68 |
+ r = inotify_add_watch(u->inotify_fd, "/dev/snd", IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF); |
69 |
|
70 |
if (r < 0) { |
71 |
int saved_errno = errno; |
72 |
diff --git a/src/modules/udev-util.c b/src/modules/udev-util.c |
73 |
index 2f18bc4..b0bb17d 100644 |
74 |
--- a/src/modules/udev-util.c |
75 |
+++ b/src/modules/udev-util.c |
76 |
@@ -180,7 +180,7 @@ int pa_udev_get_info(int card_idx, pa_proplist *p) { |
77 |
goto finish; |
78 |
} |
79 |
|
80 |
- t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx); |
81 |
+ t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx); |
82 |
card = udev_device_new_from_syspath(udev, t); |
83 |
pa_xfree(t); |
84 |
|
85 |
@@ -277,7 +277,7 @@ char* pa_udev_get_property(int card_idx, const char *name) { |
86 |
goto finish; |
87 |
} |
88 |
|
89 |
- t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx); |
90 |
+ t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx); |
91 |
card = udev_device_new_from_syspath(udev, t); |
92 |
pa_xfree(t); |
93 |
|
94 |
-- |
95 |
1.7.8.6 |