Commit 1594d7cc authored by Joseph Noir's avatar Joseph Noir

Fix include of time.h

In case this is compiled for RIoT, the header does not
necessarily have the extern C def.
parent 255393c8
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#ifndef CAF_THREAD_HPP #ifndef CAF_THREAD_HPP
#define CAF_THREAD_HPP #define CAF_THREAD_HPP
#include <time.h>
#ifdef __RIOTBUILD_FLAG #ifdef __RIOTBUILD_FLAG
#include <tuple> #include <tuple>
...@@ -35,6 +33,7 @@ ...@@ -35,6 +33,7 @@
#include <stdexcept> #include <stdexcept>
extern "C" { extern "C" {
#include <time.h>
#include "thread.h" #include "thread.h"
} }
...@@ -193,7 +192,6 @@ thread::thread(F&& f, Args&&... args) { ...@@ -193,7 +192,6 @@ thread::thread(F&& f, Args&&... args) {
if (m_handle >= 0) { if (m_handle >= 0) {
p.release(); p.release();
} else { } else {
//std::__throw_system_error(static_cast<int>(m_handle),
throw std::runtime_error("Failed to create thread."); throw std::runtime_error("Failed to create thread.");
} }
} }
...@@ -215,6 +213,8 @@ inline void swap (thread& lhs, thread& rhs) noexcept { ...@@ -215,6 +213,8 @@ inline void swap (thread& lhs, thread& rhs) noexcept {
#else #else
#include <time.h>
#include <thread> #include <thread>
namespace caf { namespace caf {
......
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