[protozero] 01/02: Add upstream patch to fix FTBFS on big endian architectures.
Bas Couwenberg
sebastic at debian.org
Tue Nov 15 19:46:40 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository protozero.
commit 59e4abefd73d6934fe7cf1cedf100322cac161df
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Tue Nov 15 20:41:23 2016 +0100
Add upstream patch to fix FTBFS on big endian architectures.
---
debian/changelog | 6 ++++
.../0001-Fixed-byteswap-implementation.patch | 41 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 48 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index f137231..5f9df96 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+protozero (1.4.3-1~exp2) UNRELEASED; urgency=medium
+
+ * Add upstream patch to fix FTBFS on big endian architectures.
+
+ -- Bas Couwenberg <sebastic at debian.org> Tue, 15 Nov 2016 20:41:05 +0100
+
protozero (1.4.3-1~exp1) experimental; urgency=medium
* New upstream release.
diff --git a/debian/patches/0001-Fixed-byteswap-implementation.patch b/debian/patches/0001-Fixed-byteswap-implementation.patch
new file mode 100644
index 0000000..be6157e
--- /dev/null
+++ b/debian/patches/0001-Fixed-byteswap-implementation.patch
@@ -0,0 +1,41 @@
+Description: Fixed byteswap implementation.
+Author: Jochen Topf <jochen at topf.org>
+Origin: https://github.com/mapbox/protozero/commit/ee7593c33a032ff88bb45d379b13892f10cfc46c
+
+--- a/include/protozero/byteswap.hpp
++++ b/include/protozero/byteswap.hpp
+@@ -18,7 +18,6 @@ documentation.
+
+ #include <cstdint>
+ #include <cassert>
+-#include <type_traits>
+
+ #include <protozero/config.hpp>
+
+@@ -51,9 +50,25 @@ inline uint64_t byteswap_impl(uint64_t v
+ #endif
+ }
+
++inline int32_t byteswap_impl(int32_t value) noexcept {
++ return static_cast<int32_t>(byteswap_impl(static_cast<uint32_t>(value)));
++}
++
++inline int64_t byteswap_impl(int64_t value) noexcept {
++ return static_cast<int64_t>(byteswap_impl(static_cast<uint64_t>(value)));
++}
++
++inline float byteswap_impl(float value) noexcept {
++ return static_cast<float>(byteswap_impl(static_cast<uint32_t>(value)));
++}
++
++inline double byteswap_impl(double value) noexcept {
++ return static_cast<double>(byteswap_impl(static_cast<uint64_t>(value)));
++}
++
+ template <typename T>
+ inline void byteswap_inplace(T& value) noexcept {
+- value = static_cast<T>(byteswap_impl(static_cast<typename std::make_unsigned<T>::type>(value)));
++ value = static_cast<T>(byteswap_impl(value));
+ }
+
+ } // end namespace detail
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1b73c05
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fixed-byteswap-implementation.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/protozero.git
More information about the Pkg-grass-devel
mailing list