From 17adde8a251dd4b73adfda42dfacaaeade06b8a3 Mon Sep 17 00:00:00 2001 From: landry Date: Sat, 6 Jul 2013 09:14:12 +0000 Subject: [PATCH] Fix build on hppa by applying the same dark magic as used on sparc64/mips64el in patch-src_hash_map_h, cluestick from espie@ --- devel/ninja/patches/patch-src_build_log_cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 devel/ninja/patches/patch-src_build_log_cc diff --git a/devel/ninja/patches/patch-src_build_log_cc b/devel/ninja/patches/patch-src_build_log_cc new file mode 100644 index 00000000000..9bc6ebdb231 --- /dev/null +++ b/devel/ninja/patches/patch-src_build_log_cc @@ -0,0 +1,16 @@ +$OpenBSD: patch-src_build_log_cc,v 1.1 2013/07/06 09:14:12 landry Exp $ + +Work-around unaligned accesses on strict arches such as hppa + +--- src/build_log.cc.orig Sat Jul 6 03:03:31 2013 ++++ src/build_log.cc Sat Jul 6 03:08:13 2013 +@@ -57,7 +57,8 @@ uint64_t MurmurHash64A(const void* key, size_t len) { + const uint64_t * data = (const uint64_t *)key; + const uint64_t * end = data + (len/8); + while (data != end) { +- uint64_t k = *data++; ++ uint64_t k; ++ memcpy(&k, data++, sizeof k); + k *= m; + k ^= k >> r; + k *= m;