File: 02-boost.diff

package info (click to toggle)
fastnetmon 1.2.4-2%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,024 kB
  • sloc: cpp: 40,524; perl: 2,275; python: 665; php: 422; sh: 150; ruby: 68; makefile: 37; ansic: 26
file content (31 lines) | stat: -rw-r--r-- 1,176 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From c0d04543debf001c72dfb097cddb6bf780a42df0 Mon Sep 17 00:00:00 2001
From: Pavel Odintsov <pavel.odintsov@gmail.com>
Date: Tue, 7 Mar 2023 12:43:42 +0000
Subject: [PATCH] Attempt to add workaround for Boost 1.74. Closes #970

---
 src/abstract_subnet_counters.hpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/abstract_subnet_counters.hpp b/src/abstract_subnet_counters.hpp
index 25dbd835..bee5323b 100644
--- a/src/abstract_subnet_counters.hpp
+++ b/src/abstract_subnet_counters.hpp
@@ -5,6 +5,17 @@
 
 #include "speed_counters.hpp"
 
+//
+// Even latest Debian Sid (March 2023) uses Boost 1.74 which does not behave well with very fresh compilers and triggers this error:
+// https://github.com/pavel-odintsov/fastnetmon/issues/970
+// This bug was fixed in fresh Boost versions: https://github.com/boostorg/serialization/issues/219 and we apply workaround only for 1.74
+//
+
+#include <boost/serialization/version.hpp>
+#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 == 74
+#include <boost/serialization/library_version_type.hpp>
+#endif
+
 #include <boost/serialization/unordered_map.hpp>
 
 // Class for abstract per key counters