summaryrefslogtreecommitdiff
path: root/sci-electronics/gazebo/files/boost.patch
blob: 56f26387c58ce55be53f2d92a50118ebdd99d02a (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 6b4d0f0b94cb2d98e6a48970c1c128e9b4f13e47 Mon Sep 17 00:00:00 2001
From: Steve Peters <scpeters@openrobotics.org>
Date: Fri, 10 May 2024 15:39:02 +0200
Subject: [PATCH 1/2] Fix build with boost 1.85.0

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
---
 gazebo/common/Console.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gazebo/common/Console.cc b/gazebo/common/Console.cc
index 6b86bc2d02..bb4dbe3180 100644
--- a/gazebo/common/Console.cc
+++ b/gazebo/common/Console.cc
@@ -221,7 +221,7 @@ void FileLogger::Init(const std::string &_prefix, const std::string &_filename)
   if (boost::filesystem::is_directory(logPath))
     this->logDirectory = logPath.string();
   else
-    this->logDirectory = logPath.branch_path().string();
+    this->logDirectory = logPath.parent_path().string();
 }
 
 /////////////////////////////////////////////////

From 27c2277a2376f9d82755e975ae8b564d9d6ca6ed Mon Sep 17 00:00:00 2001
From: Steve Peters <scpeters@openrobotics.org>
Date: Fri, 10 May 2024 17:43:32 +0200
Subject: [PATCH 2/2] Fix build error in LogPlay.cc as well

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
---
 gazebo/util/LogPlay.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gazebo/util/LogPlay.cc b/gazebo/util/LogPlay.cc
index 70cfcc3346..be00820edb 100644
--- a/gazebo/util/LogPlay.cc
+++ b/gazebo/util/LogPlay.cc
@@ -414,8 +414,8 @@ common::Time LogPlay::LogEndTime() const
 /////////////////////////////////////////////////
 std::string LogPlay::Filename() const
 {
-  return boost::filesystem::basename(this->dataPtr->filename) +
-    boost::filesystem::extension(this->dataPtr->filename);
+  boost::filesystem::path path(this->dataPtr->filename);
+  return path.stem().string() + path.extension().string();
 }
 
 /////////////////////////////////////////////////