aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/semaphore.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/utils/semaphore.h')
-rw-r--r--src/lib/utils/semaphore.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/utils/semaphore.h b/src/lib/utils/semaphore.h
index 994a15f21..87e6b84fe 100644
--- a/src/lib/utils/semaphore.h
+++ b/src/lib/utils/semaphore.h
@@ -8,11 +8,15 @@
#ifndef BOTAN_SEMAPHORE_H__
#define BOTAN_SEMAPHORE_H__
-#include <mutex>
+#include <botan/mutex.h>
+
+#if defined(BOTAN_TARGET_OS_HAS_THREADS)
#include <condition_variable>
+#endif
namespace Botan {
+#if defined(BOTAN_TARGET_OS_HAS_THREADS)
class Semaphore
{
public:
@@ -25,9 +29,10 @@ class Semaphore
private:
int m_value;
int m_wakeups;
- std::mutex m_mutex;
+ mutex_type m_mutex;
std::condition_variable m_cond;
};
+#endif
}