diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-03-20 10:22:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-20 10:22:13 +0100 |
commit | 722ea7f065eaf28cbe3c27e0e8cafb53a7799980 (patch) | |
tree | 11606fe38b6c751957336727bd06441b0ffc1ce7 | |
parent | a01b0d47680947b0b253fdfc484faf543a000cf6 (diff) | |
parent | 7bc5ecf049e129b43bf16c589d8bed8687d992d6 (diff) |
Merge pull request #26485 from vespa-engine/toregge/libstdcxx-11-lacks-stream-operators-for-duration
libstdc++ 11 lacks stream operators for duration. Use same workaround
-rw-r--r-- | vespalib/src/vespa/vespalib/util/time.cpp | 3 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/util/time.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/vespalib/src/vespa/vespalib/util/time.cpp b/vespalib/src/vespa/vespalib/util/time.cpp index 42155647870..cba26f24059 100644 --- a/vespalib/src/vespa/vespalib/util/time.cpp +++ b/vespalib/src/vespa/vespalib/util/time.cpp @@ -93,9 +93,10 @@ Timer::waitAtLeast(duration dur, bool busyWait) { } -#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 160000 +#if (defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 160000) || (!defined(_LIBCPP_VERSION) && defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 12) // Temporary workaround until libc++ supports stream operators for duration +// Temporary workaround while using libstdc++ 11 #include <ostream> diff --git a/vespalib/src/vespa/vespalib/util/time.h b/vespalib/src/vespa/vespalib/util/time.h index 2cb53df8ae2..b893661832f 100644 --- a/vespalib/src/vespa/vespalib/util/time.h +++ b/vespalib/src/vespa/vespalib/util/time.h @@ -101,9 +101,10 @@ duration adjustTimeoutByHz(duration timeout, long hz); } -#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 160000 +#if (defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 160000) || (!defined(_LIBCPP_VERSION) && defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 12) // Temporary workaround until libc++ supports stream operators for duration +// Temporary workaround while using libstdc++ 11 #include <iosfwd> |