Source: boost1.71
Version: 1.71.0-6
Severity: important
Tags: patch upstream fixed-upstream
Control: forwarded -1 https://github.com/boostorg/test/pull/267

Hi,

boost 1.71 currently fails to build on Hurd [1].

The issue is that the test library checks for macOS APIs using a
preprocessor define that matches also GNU/Hurd; this is easily fixed
by checking also for macOS defines, as I sent upstream [2] which was
just merged for the future 1.74.

In the meanwhile, I attach the backported fix for this.

[1] 
https://buildd.debian.org/status/fetch.php?pkg=boost1.71&arch=hurd-i386&ver=1.71.0-6&stamp=1580892249&raw=0
[2] https://github.com/boostorg/test/pull/267

Thanks,
-- 
Pino
>From 92e1131fb00c5fd16911ea98777b872dbd0181b1 Mon Sep 17 00:00:00 2001
From: Pino Toscano <toscano.p...@tiscali.it>
Date: Mon, 20 Apr 2020 08:31:02 +0200
Subject: [PATCH] Use macOS API only on macOS

__MACH__ matches any Mach-based OS, which means both macOS and GNU/Hurd;
since the API used is really specific to macOS, then also check for
__APPLE__.
---
 libs/test/include/boost/test/utils/timer.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/test/include/boost/test/utils/timer.hpp 
b/libs/test/include/boost/test/utils/timer.hpp
index 1241692e..78dfa708 100644
--- a/libs/test/include/boost/test/utils/timer.hpp
+++ b/libs/test/include/boost/test/utils/timer.hpp
@@ -18,7 +18,7 @@
 
 # if defined(_WIN32) || defined(__CYGWIN__)
 #   define BOOST_TEST_TIMER_WINDOWS_API
-# elif defined(__MACH__)// && !defined(CLOCK_MONOTONIC)
+# elif defined(__MACH__) && defined(__APPLE__)// && !defined(CLOCK_MONOTONIC)
 #   // we compile for all macs the same, CLOCK_MONOTONIC introduced in 10.12
 #   define BOOST_TEST_TIMER_MACH_API
 # else
-- 
2.26.2

Reply via email to