]> git.pld-linux.org Git - packages/pulseaudio.git/blame - pulseaudio-pa-machine-id.patch
- add systemd tmpfiles config
[packages/pulseaudio.git] / pulseaudio-pa-machine-id.patch
CommitLineData
34291079
JB
1--- pulseaudio-1.0/configure.ac.orig 2011-09-27 09:55:58.000000000 +0200
2+++ pulseaudio-1.0/configure.ac 2011-10-12 20:57:56.702352030 +0200
3@@ -1112,6 +1112,9 @@
4 AC_SUBST(pulseconfdir, ["${sysconfdir}/pulse"])
5 AX_DEFINE_DIR(PA_DEFAULT_CONFIG_DIR, pulseconfdir, [Location of configuration files])
6
7+PA_PA_MACHINE_ID="${sysconfdir}/pulse"
8+AX_DEFINE_DIR(PA_PA_MACHINE_ID, PA_PA_MACHINE_ID, [PA machine-id file])
9+
10 AC_DEFINE_UNQUOTED(PA_BUILDDIR, "${ac_pwd}/src", [Location of uninstalled binaries])
11
12 #### Mac OSX specific stuff #####
cf87a08b
JR
13--- pulseaudio-0.9.21/src/pulsecore/core-util.c.orig 2009-11-23 04:57:07.000000000 +0100
14+++ pulseaudio-0.9.21/src/pulsecore/core-util.c 2010-06-09 00:20:25.361930253 +0200
15@@ -2560,6 +2560,20 @@
16 /* The returned value is supposed be some kind of ascii identifier
17 * that is unique and stable across reboots. */
18
19+ /* First we try locally configured ID */
20+
21+ if ((f = fopen(PA_PA_MACHINE_ID, "r"))) {
22+ char ln[34] = "", *r;
23+
24+ r = fgets(ln, sizeof(ln)-1, f);
25+ fclose(f);
26+
27+ pa_strip_nl(ln);
28+
29+ if (r && ln[0])
30+ return pa_utf8_filter(ln);
31+ }
32+
33 /* First we try the D-Bus UUID, which is the best option we have,
34 * since it fits perfectly our needs and is not as volatile as the
35 * hostname which might be set from dhcp. */
This page took 0.040107 seconds and 4 git commands to generate.