Fix compilation error on armv7hl

epel9
Daiki Ueno 9 years ago
parent 6f90dfd106
commit c28f978e6a

@ -0,0 +1,25 @@
Index: msgpack-1.3.0/include/msgpack/adaptor/int.hpp
===================================================================
--- msgpack-1.3.0.orig/include/msgpack/adaptor/int.hpp
+++ msgpack-1.3.0/include/msgpack/adaptor/int.hpp
@@ -70,13 +70,17 @@ namespace detail {
template <>
struct object_char_sign<true> {
static inline void make(msgpack::object& o, char v) {
- if (v < 0) {
+ // Since char is unsigned on ARM, the condition below
+ // always evaluates to true and causes error if
+ // -Werror=type-limits is enabled.
+ int v2 = v;
+ if (v2 < 0) {
o.type = msgpack::type::NEGATIVE_INTEGER;
- o.via.i64 = v;
+ o.via.i64 = v2;
}
else {
o.type = msgpack::type::POSITIVE_INTEGER;
- o.via.u64 = v;
+ o.via.u64 = v2;
}
}
};

@ -8,6 +8,8 @@ License: Boost
URL: http://msgpack.org
Source0: https://github.com/msgpack/msgpack-c/releases/download/cpp-%{version}/%{name}-%{version}.tar.gz
Patch0: msgpack-1.3.0-arm-char.patch
# for regenerating configure
BuildRequires: libtool
# for %%check
@ -31,6 +33,7 @@ Libraries and header files for %{name}
%prep
%setup -q
%patch0 -p1 -b .arm-char
%build

Loading…
Cancel
Save