Commit 37f8dbe7 authored by captainwong's avatar captainwong

fix chrono wrapper linux build

parent c9174ca4
#pragma once #pragma once
#include "../base/config.h" #include "../base/config.h"
#ifdef __GNUG__
#include <string.h> // memcpy
#endif
#include <chrono> #include <chrono>
#include <string> #include <string>
#include <ctime> #include <ctime>
...@@ -10,6 +15,7 @@ ...@@ -10,6 +15,7 @@
namespace jlib { namespace jlib {
#ifdef __GNUG__ #ifdef __GNUG__
#include <string.h> // memcpy
inline void localtime_s(struct tm* tmtm, const time_t* t) { inline void localtime_s(struct tm* tmtm, const time_t* t) {
memcpy(tmtm, localtime(t), sizeof(tm)); memcpy(tmtm, localtime(t), sizeof(tm));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment