This commit is contained in:
parent
2bdb396257
commit
e05df7461e
@ -1,42 +0,0 @@
|
||||
From e446ad2f7fd795d7d2afa654262c77cdbc45ea4a Mon Sep 17 00:00:00 2001
|
||||
From: Wolfgang Bauer <wbauer@tmo.at>
|
||||
Date: Tue, 17 Jan 2023 11:33:47 +0100
|
||||
Subject: [PATCH] Fix linking with boost 1.75.0
|
||||
|
||||
Boost 1.75.0 has a bug that causes "multiple definitions" errors in the
|
||||
linking stage. This was fixed in later versions by declaring some
|
||||
functions as inline.
|
||||
|
||||
See https://github.com/boostorg/safe_numerics/issues/106 .
|
||||
|
||||
As a (ugly) workaround, override the function that breaks kdiff3's build
|
||||
to be inline before including the boost headers (when using 1.75.0).
|
||||
---
|
||||
src/TypeUtils.h | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/src/TypeUtils.h b/src/TypeUtils.h
|
||||
index a9c3ba2..ab735ba 100644
|
||||
--- a/src/TypeUtils.h
|
||||
+++ b/src/TypeUtils.h
|
||||
@@ -14,6 +14,17 @@
|
||||
#include <type_traits>
|
||||
#include <limits>
|
||||
|
||||
+#include <boost/version.hpp>
|
||||
+#if BOOST_VERSION == 107500
|
||||
+// prevent multiple definitions of literal_string with boost 1.75
|
||||
+// see https://github.com/boostorg/safe_numerics/issues/106
|
||||
+#include <cstdint>
|
||||
+namespace boost::safe_numerics {
|
||||
+ enum class safe_numerics_error : std::uint8_t;
|
||||
+ inline const char * literal_string(const safe_numerics_error & e);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#include <boost/safe_numerics/automatic.hpp>
|
||||
#include <boost/safe_numerics/safe_integer.hpp>
|
||||
|
||||
--
|
||||
2.40.1
|
||||
|
@ -10,6 +10,8 @@ Tue May 21 07:39:29 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||
* Cleanup resize code
|
||||
* Limit new line computation to 0
|
||||
* Fix broken getBestFirstLine calcucation
|
||||
- Drop obsolete patch:
|
||||
* Fix-linking-with-boost-1.75.0.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 25 08:35:20 UTC 2024 - Wolfgang Bauer <wbauer1@a1.net>
|
||||
|
Loading…
Reference in New Issue
Block a user