From 123a89d00cab36f9b3de46c8397af09f97e69dbc Mon Sep 17 00:00:00 2001 From: Christopher Tubbs Date: Thu, 21 Dec 2017 23:46:44 -0500 Subject: [PATCH] Fix for rhbz#1507518 --- THRIFT-4177.patch | 27 +++++++++++++++++++++++++++ thrift.spec | 7 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 THRIFT-4177.patch diff --git a/THRIFT-4177.patch b/THRIFT-4177.patch new file mode 100644 index 0000000..c0c331b --- /dev/null +++ b/THRIFT-4177.patch @@ -0,0 +1,27 @@ +diff --git a/compiler/cpp/src/thrift/generate/t_java_generator.cc b/compiler/cpp/src/thrift/generate/t_java_generator.cc +index fb581e4..90dfa06 100644 +--- a/compiler/cpp/src/thrift/generate/t_java_generator.cc ++++ b/compiler/cpp/src/thrift/generate/t_java_generator.cc +@@ -4657,8 +4657,9 @@ void t_java_generator::generate_deep_copy_non_container(ofstream& out, + std::string dest_name, + t_type* type) { + (void)dest_name; ++ type = get_true_type(type); + if (type->is_base_type() || type->is_enum() || type->is_typedef()) { +- if (((t_base_type*)type)->is_binary()) { ++ if (type->is_binary()) { + out << "org.apache.thrift.TBaseHelper.copyBinary(" << source_name << ")"; + } else { + // everything else can be copied directly +diff --git a/compiler/cpp/src/thrift/parse/t_type.h b/compiler/cpp/src/thrift/parse/t_type.h +index 30f8c1f7..3a6d1e04 100644 +--- a/compiler/cpp/src/thrift/parse/t_type.h ++++ b/compiler/cpp/src/thrift/parse/t_type.h +@@ -47,6 +47,7 @@ public: + virtual bool is_void() const { return false; } + virtual bool is_base_type() const { return false; } + virtual bool is_string() const { return false; } ++ virtual bool is_binary() const { return false; } + virtual bool is_bool() const { return false; } + virtual bool is_typedef() const { return false; } + virtual bool is_enum() const { return false; } diff --git a/thrift.spec b/thrift.spec index 0a6a20a..1e17eb6 100644 --- a/thrift.spec +++ b/thrift.spec @@ -50,7 +50,7 @@ Name: thrift Version: 0.10.0 -Release: 3%{?dist} +Release: 8%{?dist} Summary: Software framework for cross-language services development # Parts of the source are used under the BSD and zlib licenses, but @@ -78,6 +78,8 @@ Patch1: fb303-%{version}-buildxml.patch Patch2: configure-java-prefix.patch # fix for ppc64le builds not linking to /usr/lib64 directory Patch3: fix-ppc64le-builds.patch +# fix for s390x build; incorporates fix for THRIFT-4177 with some code from THRIFT-4136 +Patch4: THRIFT-4177.patch Group: Development/Libraries @@ -521,6 +523,9 @@ find %{buildroot} -name \*.py -exec grep -q /usr/bin/env {} \; -print | xargs -r %doc LICENSE NOTICE %changelog +* Fri Dec 22 2017 Christopher Tubbs - 0.10.0-8 +- Fix for rhbz#1507518 + * Mon May 15 2017 Fedora Release Engineering - 0.10.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild