jpcordovae

spring boost 1.50 TIME_UTC patch

Aug 2nd, 2012
124
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/rts/lib/headlessStubs/sdlstub_cppbit.cpp b/rts/lib/headlessStubs/sdlstub_cppbit.cpp
  2. index e8e4790..8018d7b 100644
  3. --- a/rts/lib/headlessStubs/sdlstub_cppbit.cpp
  4. +++ b/rts/lib/headlessStubs/sdlstub_cppbit.cpp
  5. @@ -15,7 +15,11 @@ extern "C" {
  6.  int stub_sdl_getSystemMilliSeconds() {
  7.  
  8.     boost::xtime t;
  9. +#if BOOST_VERSION >= 105000
  10. +   boost::xtime_get(&t, boost::TIME_UTC_);
  11. +#else
  12.     boost::xtime_get(&t, boost::TIME_UTC);
  13. +#endif
  14.     const int milliSeconds = t.sec * 1000 + (t.nsec / 1000000);  
  15.     return milliSeconds;
  16.  }
  17. @@ -23,7 +27,11 @@ int stub_sdl_getSystemMilliSeconds() {
  18.  void stub_sdl_sleepMilliSeconds(int milliSeconds) {
  19.  
  20.     boost::xtime t;
  21. +#if BOOST_VERSION >= 105000
  22. +   boost::xtime_get(&t, boost::TIME_UTC_);
  23. +#else
  24.     boost::xtime_get(&t, boost::TIME_UTC);
  25. +#endif
  26.     t.nsec += 1000000 * milliSeconds;
  27.     boost::thread::sleep(t);
  28.  }
RAW Paste Data