From dc473d91979052668a2b3ebaff3f396043413240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 27 Aug 2013 11:13:55 +0200 Subject: [PATCH] - apply upstream fix for big endians --- msgpack-fix-decode-on-bigendian-systems.patch | 55 +++++++++++++++++++ msgpack.spec | 7 ++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 msgpack-fix-decode-on-bigendian-systems.patch diff --git a/msgpack-fix-decode-on-bigendian-systems.patch b/msgpack-fix-decode-on-bigendian-systems.patch new file mode 100644 index 0000000..abddf1e --- /dev/null +++ b/msgpack-fix-decode-on-bigendian-systems.patch @@ -0,0 +1,55 @@ +From b8aa93ce30d11d091b339bff0e10ddf3a8d08daf Mon Sep 17 00:00:00 2001 +From: Hideyuki Tanaka +Date: Thu, 26 Jan 2012 16:38:27 +0900 +Subject: [PATCH] fix decode on bigendian systems + +--- + msgpack/sysdep.h | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/src/msgpack/sysdep.h b/src/msgpack/sysdep.h +index 0a99de9..4fedbd8 100644 +--- a/src/msgpack/sysdep.h ++++ b/src/msgpack/sysdep.h +@@ -153,24 +153,24 @@ typedef unsigned int _msgpack_atomic_counter_t; + #define _msgpack_be64(x) (x) + + #define _msgpack_load16(cast, from) ((cast)( \ +- (((uint16_t)((uint8_t*)from)[1]) << 8) | \ +- (((uint16_t)((uint8_t*)from)[0]) ) )) ++ (((uint16_t)((uint8_t*)from)[0]) << 8) | \ ++ (((uint16_t)((uint8_t*)from)[1]) ) )) + + #define _msgpack_load32(cast, from) ((cast)( \ +- (((uint32_t)((uint8_t*)from)[3]) << 24) | \ +- (((uint32_t)((uint8_t*)from)[2]) << 16) | \ +- (((uint32_t)((uint8_t*)from)[1]) << 8) | \ +- (((uint32_t)((uint8_t*)from)[0]) ) )) ++ (((uint32_t)((uint8_t*)from)[0]) << 24) | \ ++ (((uint32_t)((uint8_t*)from)[1]) << 16) | \ ++ (((uint32_t)((uint8_t*)from)[2]) << 8) | \ ++ (((uint32_t)((uint8_t*)from)[3]) ) )) + + #define _msgpack_load64(cast, from) ((cast)( \ +- (((uint64_t)((uint8_t*)from)[7]) << 56) | \ +- (((uint64_t)((uint8_t*)from)[6]) << 48) | \ +- (((uint64_t)((uint8_t*)from)[5]) << 40) | \ +- (((uint64_t)((uint8_t*)from)[4]) << 32) | \ +- (((uint64_t)((uint8_t*)from)[3]) << 24) | \ +- (((uint64_t)((uint8_t*)from)[2]) << 16) | \ +- (((uint64_t)((uint8_t*)from)[1]) << 8) | \ +- (((uint64_t)((uint8_t*)from)[0]) ) )) ++ (((uint64_t)((uint8_t*)from)[0]) << 56) | \ ++ (((uint64_t)((uint8_t*)from)[1]) << 48) | \ ++ (((uint64_t)((uint8_t*)from)[2]) << 40) | \ ++ (((uint64_t)((uint8_t*)from)[3]) << 32) | \ ++ (((uint64_t)((uint8_t*)from)[4]) << 24) | \ ++ (((uint64_t)((uint8_t*)from)[5]) << 16) | \ ++ (((uint64_t)((uint8_t*)from)[6]) << 8) | \ ++ (((uint64_t)((uint8_t*)from)[7]) ) )) + #endif + + +-- +1.8.1.4 + diff --git a/msgpack.spec b/msgpack.spec index da2cecd..e8ef4f9 100644 --- a/msgpack.spec +++ b/msgpack.spec @@ -1,6 +1,6 @@ Name: msgpack Version: 0.5.7 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Binary-based efficient object serialization library Group: System Environment/Libraries @@ -8,6 +8,7 @@ License: ASL 2.0 URL: http://msgpack.org Source0: http://msgpack.org/releases/cpp/%{name}-%{version}.tar.gz Patch0: msgpack-gtest-implicit-dso.patch +Patch1: msgpack-fix-decode-on-bigendian-systems.patch # for regenerating configure BuildRequires: libtool @@ -33,6 +34,7 @@ Libraries and header files for %{name} %prep %setup -q %patch0 -p1 -b .gtest-implicit-dso +%patch1 -p1 -b .big-endian %build @@ -65,6 +67,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f '{}' ';' %changelog +* Tue Aug 27 2013 Dan HorĂ¡k - 0.5.7-5 +- apply upstream fix for big endians + * Sat Aug 03 2013 Fedora Release Engineering - 0.5.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild