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 @@
#ifndef CAF_THREAD_HPP
#define CAF_THREAD_HPP
#include <time.h>
#ifdef __RIOTBUILD_FLAG
#include <tuple>
......@@ -35,6 +33,7 @@
#include <stdexcept>
extern "C" {
#include <time.h>
#include "thread.h"
}
......@@ -193,7 +192,6 @@ thread::thread(F&& f, Args&&... args) {
if (m_handle >= 0) {
p.release();
} else {
//std::__throw_system_error(static_cast<int>(m_handle),
throw std::runtime_error("Failed to create thread.");
}
}
......@@ -215,6 +213,8 @@ inline void swap (thread& lhs, thread& rhs) noexcept {
#else
#include <time.h>
#include <thread>
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