From be54f4a0b6f160f8a2b0b9e9c988fb5251f70a97 Mon Sep 17 00:00:00 2001 From: Asad Saeeduddin Date: Mon, 12 Mar 2018 00:56:41 -0400 Subject: Wrap thread local in function for Cygwin Fixes #1826. See #1352 for a previous instance of a similar change. --- src/libutil/logging.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/libutil/logging.cc') 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(); -- cgit 1.4.1