about summary refs log tree commit diff
path: root/src/libutil/logging.cc
diff options
context:
space:
mode:
authorAsad Saeeduddin <masaeedu@gmail.com>2018-03-12T04·56-0400
committerAsad Saeeduddin <masaeedu@gmail.com>2018-03-12T04·56-0400
commitbe54f4a0b6f160f8a2b0b9e9c988fb5251f70a97 (patch)
tree6c8b27f007a89501d3378309a7caff4afbd4d115 /src/libutil/logging.cc
parent24b739817fb719553dd4840308ee32ff60c88c1f (diff)
Wrap thread local in function for Cygwin
Fixes #1826. See #1352 for a previous instance of a similar change.
Diffstat (limited to 'src/libutil/logging.cc')
-rw-r--r--src/libutil/logging.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc
index c1cff5cf9061..e860b27d3d0b 100644
--- a/src/libutil/logging.cc
+++ b/src/libutil/logging.cc
@@ -6,7 +6,16 @@
 
 namespace nix {
 
-thread_local ActivityId curActivity = 0;
+static thread_local ActivityId curActivity = 0;
+
+ActivityId getCurActivity()
+{
+    return curActivity;
+}
+void setCurActivity(const ActivityId activityId)
+{
+    curActivity = activityId;
+}
 
 Logger * logger = makeDefaultLogger();