Skip to content

Commit 66ab901

Browse files
committed
Exclude Mq and Timer from link build
1 parent bec8f9d commit 66ab901

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

libraries/ThreadAPI/include/thread/Timer.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#ifndef THREADAPI_THREAD_TIMER_HPP
44
#define THREADAPI_THREAD_TIMER_HPP
55

6+
#if !defined __link
7+
68
#include <signal.h>
79

810
#include "Signal.hpp"
@@ -65,4 +67,6 @@ class Timer : public api::ExecutionContext {
6567

6668
} // namespace thread
6769

70+
#endif
71+
6872
#endif // THREADAPI_THREAD_TIMER_HPP

libraries/ThreadAPI/src/Mq.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright 2011-2021 Tyler Gilbert and Stratify Labs, Inc; see LICENSE.md
22

3+
#if !defined __link
4+
35
#include <mqueue.h>
46

57
#include "chrono.hpp"
@@ -84,3 +86,5 @@ void Mq::unlink(const char *name){
8486
API_SYSTEM_CALL("", mq_unlink(name));
8587
}
8688

89+
#endif
90+

libraries/ThreadAPI/src/Timer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#if !defined __link
2+
13
#include <unistd.h>
24

35
#include "thread/Timer.hpp"
@@ -52,3 +54,5 @@ chrono::ClockTime Timer::alarm(const Alarm &options) {
5254
options.interval().nanoseconds() / 1000UL));
5355
return chrono::ClockTime(return_value() * 1_microseconds);
5456
}
57+
58+
#endif

0 commit comments

Comments
 (0)