From 86d07a5514d859772980ef87e39f6e2b668655c0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 21 Feb 2014 01:00:49 +0100 Subject: gnu: mpc123: Add patch that fixes a segfault. * gnu/packages/patches/mpc123-initialize-ao.patch: New file. * gnu/packages/mp3.scm (mpc123): Use it. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + gnu/packages/mp3.scm | 3 ++- gnu/packages/patches/mpc123-initialize-ao.patch | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/mpc123-initialize-ao.patch diff --git a/gnu-system.am b/gnu-system.am index 8308480c42..e7c7bb2141 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -298,6 +298,7 @@ dist_patch_DATA = \ gnu/packages/patches/make-impure-dirs.patch \ gnu/packages/patches/mcron-install.patch \ gnu/packages/patches/mit-krb5-init-fix.patch \ + gnu/packages/patches/mpc123-initialize-ao.patch \ gnu/packages/patches/patchelf-page-size.patch \ gnu/packages/patches/perl-no-sys-dirs.patch \ gnu/packages/patches/plotutils-libpng-jmpbuf.patch \ diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm index 7e324703a6..c64efe4c03 100644 --- a/gnu/packages/mp3.scm +++ b/gnu/packages/mp3.scm @@ -298,7 +298,8 @@ format.") version "/mpc123-" version ".tar.gz")) (sha256 (base32 - "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1")))) + "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1")) + (patches (list (search-patch "mpc123-initialize-ao.patch"))))) (build-system gnu-build-system) (arguments '(#:phases (alist-replace diff --git a/gnu/packages/patches/mpc123-initialize-ao.patch b/gnu/packages/patches/mpc123-initialize-ao.patch new file mode 100644 index 0000000000..85e461f896 --- /dev/null +++ b/gnu/packages/patches/mpc123-initialize-ao.patch @@ -0,0 +1,19 @@ +Description: Zero ao_sample_format structure to cope with libao 1.0.0 +Author: Colin Watson +Bug-Debian: http://bugs.debian.org/591396 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/710268 +Forwarded: no +Last-Update: 2013-05-07 + +Index: b/ao.c +=================================================================== +--- a/ao.c ++++ b/ao.c +@@ -123,6 +123,7 @@ + + /* initialize ao_format struct */ + /* XXX VERY WRONG */ ++ memset(&ao_fmt, 0, sizeof(ao_fmt)); + ao_fmt.bits=16; /*tmp_stream_info.average_bitrate;*/ + ao_fmt.rate=streaminfo->sample_freq; + ao_fmt.channels=streaminfo->channels; -- cgit 1.4.1