guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: libgpg-error: Fix building on aarch64-linux.


From: Efraim Flashner
Subject: 01/01: gnu: libgpg-error: Fix building on aarch64-linux.
Date: Mon, 2 Apr 2018 08:18:22 -0400 (EDT)

efraim pushed a commit to branch core-updates
in repository guix.

commit 1bf7ef856b6194f4a9590ce431c14742fe7c0d92
Author: Efraim Flashner <address@hidden>
Date:   Mon Apr 2 15:17:05 2018 +0300

    gnu: libgpg-error: Fix building on aarch64-linux.
    
    * gnu/packages/patches/gnupg.scm (libgpg-error)[source]: Add patch.
    * gnu/packages/patches/libgpg-error-aarch64-logging-fix.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register it.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/gnupg.scm                             |  3 +-
 .../patches/libgpg-error-aarch64-logging-fix.patch | 58 ++++++++++++++++++++++
 3 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 78bad98..91ccb47 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -845,6 +845,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/libgdata-glib-duplicate-tests.patch     \
   %D%/packages/patches/libgnome-encoding.patch                 \
   %D%/packages/patches/libgnomeui-utf8.patch                   \
+  %D%/packages/patches/libgpg-error-aarch64-logging-fix.patch  \
   %D%/packages/patches/libgxps-CVE-2017-11590.patch            \
   %D%/packages/patches/libffi-3.2.1-complex-alpha.patch                \
   %D%/packages/patches/libjxr-fix-function-signature.patch     \
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 94908a7..08c78ec 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -76,7 +76,8 @@
                           version ".tar.bz2"))
       (sha256
        (base32
-        "0jfsfnh9bxlxiwxws60yah4ybjw2hshmvqp31pri4m4h8ivrbnry"))))
+        "0jfsfnh9bxlxiwxws60yah4ybjw2hshmvqp31pri4m4h8ivrbnry"))
+      (patches (search-patches "libgpg-error-aarch64-logging-fix.patch"))))
     (build-system gnu-build-system)
     (home-page "https://gnupg.org";)
     (synopsis "Library of error values for GnuPG components")
diff --git a/gnu/packages/patches/libgpg-error-aarch64-logging-fix.patch 
b/gnu/packages/patches/libgpg-error-aarch64-logging-fix.patch
new file mode 100644
index 0000000..d848d63
--- /dev/null
+++ b/gnu/packages/patches/libgpg-error-aarch64-logging-fix.patch
@@ -0,0 +1,58 @@
+https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=patch;h=791177de023574223eddf7288eb7c5a0721ac623
+
+From 791177de023574223eddf7288eb7c5a0721ac623 Mon Sep 17 00:00:00 2001
+From: Werner Koch <address@hidden>
+Date: Sun, 18 Mar 2018 17:39:43 +0100
+Subject: [PATCH] core: Fix regression on arm64 due to invalid use of va_list.
+
+* src/logging.c (_gpgrt_log_printhex): Provide a dummy arg instead of
+NULL.
+--
+
+Fix
+Suggested-by: Jakub Wilk <address@hidden>
+
+Signed-off-by: Werner Koch <address@hidden>
+---
+ src/logging.c | 18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/logging.c b/src/logging.c
+index 1a4f620..d01f974 100644
+--- a/src/logging.c
++++ b/src/logging.c
+@@ -1090,9 +1090,10 @@ _gpgrt_log_flush (void)
+ 
+ 
+ /* Print a hexdump of (BUFFER,LENGTH).  With FMT passed as NULL print
+- * just the raw dump, with FMT being an empty string, print a trailing
+- * linefeed, otherwise print an entire debug line with the expanded
+- * FMT followed by a possible wrapped hexdump and a final LF.  */
++ * just the raw dump (in this case ARG_PTR is not used), with FMT
++ * being an empty string, print a trailing linefeed, otherwise print
++ * an entire debug line with the expanded FMT followed by a possible
++ * wrapped hexdump and a final LF.  */
+ void
+ _gpgrt_logv_printhex (const void *buffer, size_t length,
+                       const char *fmt, va_list arg_ptr)
+@@ -1150,7 +1151,16 @@ _gpgrt_log_printhex (const void *buffer, size_t length,
+       va_end (arg_ptr);
+     }
+   else
+-    _gpgrt_logv_printhex (buffer, length, NULL, NULL);
++    {
++      /* va_list is not necessary a pointer and thus we can't use NULL
++       * because that would conflict with platforms using a straight
++       * struct for it (e.g. arm64).  We use a dummy variable instead;
++       * the static is a simple way zero it out so to not get
++       * complains about uninitialized use.  */
++      static va_list dummy_argptr;
++
++      _gpgrt_logv_printhex (buffer, length, NULL, dummy_argptr);
++    }
+ }
+ 
+ 
+-- 
+2.8.0.rc3
+



reply via email to

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