[pulseaudio] 01/01: Add patch to fix pa_ncpus() on systems with dynamic CPU configurations.

Luke Yelavich themuso-guest at moszumanska.debian.org
Tue Jul 5 23:57:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

themuso-guest pushed a commit to branch master
in repository pulseaudio.

commit 967ee8255193bdde94def09e37f26e409cca4993
Author: John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>
Date:   Mon Jul 4 23:11:29 2016 +0200

    Add patch to fix pa_ncpus() on systems with dynamic CPU configurations.
    
    Closes: #829618
---
 debian/changelog                                   |  8 ++++++
 .../0001-Fix_detection_of_online_CPUs.patch        | 31 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 40 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ce69973..b664ad4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pulseaudio (9.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add 0001-Fix_detection_of_online_CPUs.patch to fix pa_ncpus()
+    on systems with dynamic CPU configurations. Closes: #829618
+
+ -- John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>  Mon, 04 Jul 2016 23:11:29 +0200
+
 pulseaudio (9.0-1) unstable; urgency=medium
 
   [ Luke Yelavich ]
diff --git a/debian/patches/0001-Fix_detection_of_online_CPUs.patch b/debian/patches/0001-Fix_detection_of_online_CPUs.patch
new file mode 100644
index 0000000..6a4d8bd
--- /dev/null
+++ b/debian/patches/0001-Fix_detection_of_online_CPUs.patch
@@ -0,0 +1,31 @@
+Description: Fix detection of online CPUs in pa_ncpus()
+ PulseAudio uses sysconf(_NC_PROCESSORS_CONF) in pulsecore/
+ core-util.c:pa_ncpus() to determine the number of available
+ CPUs on the system.
+ .
+ However, since the operating system may disable individual CPUs,
+ the number of available CPUs may be smaller than _NC_PROCESSORS_CONF
+ and pa_ncpus() will therefore report an incorrect number of CPUs.
+ This makes the once-test fail on such systems like some of the
+ sparc64 buildds.
+ .
+ Patching pa_ncpus() to use _NC_PROCESSORS_CONF fixes this problem
+ and also results in once-test passing on the sparc64 buildds.
+ .
+ This has been reported upstream as:
+ https://bugs.freedesktop.org/show_bug.cgi?id=96809
+ .
+
+--- pulseaudio-9.0.orig/src/pulsecore/core-util.c
++++ pulseaudio-9.0/src/pulsecore/core-util.c
+@@ -3179,8 +3179,8 @@ void pa_reduce(unsigned *num, unsigned *
+ unsigned pa_ncpus(void) {
+     long ncpus;
+ 
+-#ifdef _SC_NPROCESSORS_CONF
+-    ncpus = sysconf(_SC_NPROCESSORS_CONF);
++#ifdef _SC_NPROCESSORS_ONLN
++    ncpus = sysconf(_SC_NPROCESSORS_ONLN);
+ #else
+     ncpus = 1;
+ #endif
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7fc3c94
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix_detection_of_online_CPUs.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-pulseaudio/pulseaudio.git



More information about the pkg-pulseaudio-devel mailing list