summaryrefslogtreecommitdiff
path: root/community-testing/performous/fix-boost-1.50-xtime.patch
blob: d13b18c26548065fc911f70b5666436ef86282f0 (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
From a4be6f47bcdd64e7c77db0a04415973d4c322ae8 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Alvaro=20Fernando=20Garc=C3=ADa?= <alvarofernandogarcia@gmail.com>
Date: Sat, 7 Jul 2012 18:53:56 -0300
Subject: [PATCH] Fixed boost xtime.hpp usage (for 1.50 version)

---
 game/xtime.hh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/game/xtime.hh b/game/xtime.hh
index 41303cb..8f5463d 100644
--- a/game/xtime.hh
+++ b/game/xtime.hh
@@ -1,5 +1,6 @@
 #pragma once
 
+#include <boost/version.hpp>
 #include <boost/thread/xtime.hpp>
 #include <cmath>
 
@@ -20,7 +21,11 @@ namespace {
 	}
 	boost::xtime now() {
 		boost::xtime time;
+#if (BOOST_VERSION / 100 % 1000 >= 50)
+		boost::xtime_get(&time, boost::TIME_UTC_);
+#else
 		boost::xtime_get(&time, boost::TIME_UTC);
+#endif
 		return time;
 	}
 	double seconds(boost::xtime const& time) {
-- 
1.7.4.1