aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/scheduler.cxx
diff options
context:
space:
mode:
authormagenbluten <mb@64k.by>2020-06-16 16:54:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-06-18 14:12:48 +0200
commit2896bd88378712fcd253e0a03b20892acb1dd299 (patch)
tree460c45a4c0d1bc2cbe6f6dc282efd70e44385408 /libbuild2/scheduler.cxx
parent728b075cb5e0df9c386f8377e0f6961e5ccc5143 (diff)
Add NetBSD compatibility
Diffstat (limited to 'libbuild2/scheduler.cxx')
-rw-r--r--libbuild2/scheduler.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbuild2/scheduler.cxx b/libbuild2/scheduler.cxx
index f6bf24a..bf2fde8 100644
--- a/libbuild2/scheduler.cxx
+++ b/libbuild2/scheduler.cxx
@@ -3,7 +3,7 @@
#include <libbuild2/scheduler.hxx>
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
# include <pthread.h>
# ifdef __FreeBSD__
# include <pthread_np.h> // pthread_attr_get_np()
@@ -617,7 +617,7 @@ namespace build2
// particular, having a noexcept function anywhere on the exception's path
// causes the stack trace to be truncated, at least on Linux.
//
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
#ifndef LIBBUILD2_DEFAULT_STACK_SIZE
# define LIBBUILD2_DEFAULT_STACK_SIZE 8388608 // 8MB
@@ -664,7 +664,7 @@ namespace build2
if (r != 0)
throw_system_error (r);
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
pthread_attr_t attr;
int r (pthread_attr_init (&attr));