aboutsummaryrefslogtreecommitdiff
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
parent728b075cb5e0df9c386f8377e0f6961e5ccc5143 (diff)
Add NetBSD compatibility
-rw-r--r--libbuild2/bin/init.cxx2
-rw-r--r--libbuild2/scheduler.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/libbuild2/bin/init.cxx b/libbuild2/bin/init.cxx
index 0d2d9b5..de8b12a 100644
--- a/libbuild2/bin/init.cxx
+++ b/libbuild2/bin/init.cxx
@@ -327,7 +327,7 @@ namespace build2
target_triplet t (s);
l5 ([&]{trace << "canonical target: '" << t.string () << "'; "
- << "class: " << t.class_;});
+ << "class: " << t.class_ << " source: " << s;});
assert (!hint || s == t.string ());
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));