guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: libsndfile: Fix build failure on armhf.


From: Marius Bakke
Subject: 02/02: gnu: libsndfile: Fix build failure on armhf.
Date: Tue, 18 Apr 2017 12:57:37 -0400 (EDT)

mbakke pushed a commit to branch staging
in repository guix.

commit fbdd3526a1cab61602da1fcbfbc3ff02d99b23fe
Author: Marius Bakke <address@hidden>
Date:   Tue Apr 18 17:52:21 2017 +0200

    gnu: libsndfile: Fix build failure on armhf.
    
    * gnu/packages/patches/libsndfile-armhf-type-checks.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/pulseaudio.scm (libsndfile)[source]: Use it.
---
 gnu/local.mk                                       |  1 +
 .../patches/libsndfile-armhf-type-checks.patch     | 42 ++++++++++++++++++++++
 gnu/packages/pulseaudio.scm                        |  1 +
 3 files changed, 44 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index 552dd05..e6dee58 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -710,6 +710,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/libmad-armv7-thumb-pt2.patch            \
   %D%/packages/patches/libmad-frame-length.patch               \
   %D%/packages/patches/libmad-mips-newgcc.patch                        \
+  %D%/packages/patches/libsndfile-armhf-type-checks.patch      \
   %D%/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch     \
   %D%/packages/patches/libtar-CVE-2013-4420.patch \
   %D%/packages/patches/libtheora-config-guess.patch            \
diff --git a/gnu/packages/patches/libsndfile-armhf-type-checks.patch 
b/gnu/packages/patches/libsndfile-armhf-type-checks.patch
new file mode 100644
index 0000000..7e0c71c
--- /dev/null
+++ b/gnu/packages/patches/libsndfile-armhf-type-checks.patch
@@ -0,0 +1,42 @@
+This is a regression in 1.0.28 that causes a test failure on armhf.
+
+Upstream bug URL:
+
+https://github.com/erikd/libsndfile/issues/229
+
+Patch copied from upstream source repository:
+
+https://github.com/erikd/libsndfile/commit/9d470ee5577d3ccedb1c28c7e0a7295ba17feaf5
+
+From 9d470ee5577d3ccedb1c28c7e0a7295ba17feaf5 Mon Sep 17 00:00:00 2001
+From: Erik de Castro Lopo <address@hidden>
+Date: Sun, 16 Apr 2017 17:54:17 +1000
+Subject: [PATCH] src/rf64.c: Fix varargs related bug
+
+C's <stargs.h> functionality isn't type checked so that passing an
+`sf_count_t` (64 bits) by mistake in place of a `unit32_t` can cause
+errors. This would be fine if it was an error on every architecture
+and platform, but its not. This particular problem only manifested
+on armhf and some other Arm architectures. It was not an issue on
+32 bit x86.
+
+I have now fixed variants of this same bug several times.
+
+Closes: https://github.com/erikd/libsndfile/issues/229
+---
+ src/rf64.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rf64.c b/src/rf64.c
+index b3d637f..02dd904 100644
+--- a/src/rf64.c
++++ b/src/rf64.c
+@@ -742,7 +742,7 @@ rf64_write_header (SF_PRIVATE *psf, int calc_length)
+ 
+       pad_size = psf->dataoffset - 16 - psf->header.indx ;
+       if (pad_size >= 0)
+-              psf_binheader_writef (psf, "m4z", PAD_MARKER, pad_size, 
make_size_t (pad_size)) ;
++              psf_binheader_writef (psf, "m4z", PAD_MARKER, (unsigned int) 
pad_size, make_size_t (pad_size)) ;
+ 
+       if (wpriv->rf64_downgrade && (psf->filelength < RIFF_DOWNGRADE_BYTES))
+               psf_binheader_writef (psf, "tm8", data_MARKER, psf->datalength) 
;
diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm
index cd79652..8231ce0 100644
--- a/gnu/packages/pulseaudio.scm
+++ b/gnu/packages/pulseaudio.scm
@@ -50,6 +50,7 @@
              (method url-fetch)
              (uri (string-append 
"http://www.mega-nerd.com/libsndfile/files/libsndfile-";
                                  version ".tar.gz"))
+             (patches (search-patches "libsndfile-armhf-type-checks.patch"))
              (sha256
               (base32
                "1afzm7jx34jhqn32clc5xghyjglccam2728yxlx37yj2y0lkkwqz"))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]