aboutsummaryrefslogtreecommitdiff
path: root/libbutl/utility.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-07-29 11:22:46 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-07-29 11:22:46 +0200
commiteee51fe3a4ed1b822a1c5d79b9a1b653cae59dff (patch)
treed9a1e257130b5dabede89b49f006ea0f4093af33 /libbutl/utility.cxx
parent4edbb58c7f2bf1185c30021dbcdabb9553c22857 (diff)
Work around glibc bug #14898 (GitHub issue #2)
Diffstat (limited to 'libbutl/utility.cxx')
-rw-r--r--libbutl/utility.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/libbutl/utility.cxx b/libbutl/utility.cxx
index d6a21c6..c23d3f5 100644
--- a/libbutl/utility.cxx
+++ b/libbutl/utility.cxx
@@ -51,11 +51,21 @@ namespace butl
#else
__thread
#endif
- bool exception_unwinding_dtor_ = false;
+#if defined(__GLIBC__) && \
+ defined(__GLIBC_MINOR__) && \
+ (__GLIBC__ < 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ < 17)
+ int
+#else
+ bool
+#endif
+ exception_unwinding_dtor_ = false;
#ifdef _WIN32
- bool&
+ bool
exception_unwinding_dtor () {return exception_unwinding_dtor_;}
+
+ void
+ exception_unwinding_dtor (bool v) {exception_unwinding_dtor_ = v;}
#endif
#endif