summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-01-15 22:26:51 +0100
committerThomas Deutschmann <whissi@gentoo.org>2019-01-15 22:27:03 +0100
commit1b14dc8e6719814848931eb231992ba237bbad33 (patch)
treee29ed920522b1f57bd563aec72aef725d0b739f7 /net-libs
parentmedia-libs/libexif: stable 0.6.21-r2 for hppa, bug #631850 (diff)
downloadgentoo-1b14dc8e6719814848931eb231992ba237bbad33.tar.gz
gentoo-1b14dc8e6719814848931eb231992ba237bbad33.tar.bz2
gentoo-1b14dc8e6719814848931eb231992ba237bbad33.zip
net-libs/zeromq: fix test_security_zap
Closes: https://bugs.gentoo.org/673472 Package-Manager: Portage-2.3.56, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/zeromq/files/zeromq-4.3.1-fix-test_security_zap.patch25
-rw-r--r--net-libs/zeromq/zeromq-4.3.1.ebuild2
2 files changed, 26 insertions, 1 deletions
diff --git a/net-libs/zeromq/files/zeromq-4.3.1-fix-test_security_zap.patch b/net-libs/zeromq/files/zeromq-4.3.1-fix-test_security_zap.patch
new file mode 100644
index 000000000000..3c89024b84bd
--- /dev/null
+++ b/net-libs/zeromq/files/zeromq-4.3.1-fix-test_security_zap.patch
@@ -0,0 +1,25 @@
+From 4147957a5eec57ec7a2a416dca74c3c0299a3432 Mon Sep 17 00:00:00 2001
+From: Luca Boccassi <bluca@debian.org>
+Date: Sun, 13 Jan 2019 13:08:10 +0000
+Subject: [PATCH] Problem: test_security_zap fails on architectures that
+ disallow unaligned pointer access
+
+Solution: use memcpy instead of doing pointer arithmetics with casting
+and dereferencing to fix the error on sparc64
+---
+ tests/testutil_security.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/testutil_security.hpp b/tests/testutil_security.hpp
+index 90999118c..437bfb298 100644
+--- a/tests/testutil_security.hpp
++++ b/tests/testutil_security.hpp
+@@ -345,7 +345,7 @@ static int get_monitor_event_internal (void *monitor_,
+ uint8_t *data = (uint8_t *) zmq_msg_data (&msg);
+ uint16_t event = *(uint16_t *) (data);
+ if (value_)
+- *value_ = *(uint32_t *) (data + 2);
++ memcpy (value_, data + 2, sizeof (uint32_t));
+
+ // Second frame in message contains event address
+ zmq_msg_init (&msg);
diff --git a/net-libs/zeromq/zeromq-4.3.1.ebuild b/net-libs/zeromq/zeromq-4.3.1.ebuild
index ab8a55ef1195..e22d0db60dcf 100644
--- a/net-libs/zeromq/zeromq-4.3.1.ebuild
+++ b/net-libs/zeromq/zeromq-4.3.1.ebuild
@@ -26,7 +26,7 @@ DEPEND="${RDEPEND}
)
pgm? ( virtual/pkgconfig )"
-PATCHES=()
+PATCHES=( "${FILESDIR}"/${P}-fix-test_security_zap.patch )
src_prepare() {
sed \