From 2896bd88378712fcd253e0a03b20892acb1dd299 Mon Sep 17 00:00:00 2001 From: magenbluten Date: Tue, 16 Jun 2020 16:54:06 +0200 Subject: Add NetBSD compatibility --- libbuild2/bin/init.cxx | 2 +- libbuild2/scheduler.cxx | 6 +++--- 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 -#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) # include # ifdef __FreeBSD__ # include // 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)); -- cgit v1.1