On 2018 Mar 22 (Thu) at 09:49:48 +0000 (+0000), Stuart Henderson wrote:
:On 2018/03/22 08:16, Markus Hennecke wrote:
:> Commit 791177d is required to build the latest release on arm, I stripped 
:> down the patch leaving out the comments. The patch has to be removed in 
:> the next version update anyway:
:
:I'd prefer to use the full upstream patch (and copy the commit headers
:into the comment) as below, it's easier to verify that nothing else
:changed in the meantime if it's the same diff, this one is OK sthen@.
:

this fixes the build on aarch64 and armv7.  OK.


:Index: Makefile
:===================================================================
:RCS file: /cvs/ports/security/libgpg-error/Makefile,v
:retrieving revision 1.40
:diff -u -p -r1.40 Makefile
:--- Makefile   17 Mar 2018 08:49:24 -0000      1.40
:+++ Makefile   22 Mar 2018 09:48:30 -0000
:@@ -5,6 +5,7 @@ COMMENT=               error codes for GnuPG related 
: DISTNAME=             libgpg-error-1.28
: CATEGORIES=           security devel
: EXTRACT_SUFX=         .tar.bz2
:+REVISION=             0
: 
: SHARED_LIBS +=  gpg-error            3.15     # 23.0
: 
:Index: patches/patch-src_logging_c
:===================================================================
:RCS file: patches/patch-src_logging_c
:diff -N patches/patch-src_logging_c
:--- /dev/null  1 Jan 1970 00:00:00 -0000
:+++ patches/patch-src_logging_c        22 Mar 2018 09:48:30 -0000
:@@ -0,0 +1,45 @@
:+$OpenBSD$
:+
:+From 791177de023574223eddf7288eb7c5a0721ac623 Mon Sep 17 00:00:00 2001
:+From: Werner Koch <w...@gnupg.org>
:+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.
:+
:+Index: src/logging.c
:+--- src/logging.c.orig
:++++ 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);
:++    }
:+ }
:+ 
:+ 
:

-- 
Expect the worst.  It's the least you can do.

Reply via email to