Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 97beb51

Browse files
authored
Only call EventActivityIdControl ETW function on Windows. (#11549)
1 parent 0c4845c commit 97beb51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mscorlib/src/System/Diagnostics/Eventing/EventSource_CoreCLR.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static void SetCurrentThreadActivityId(Guid activityId)
3333
{
3434
if (TplEtwProvider.Log != null)
3535
TplEtwProvider.Log.SetActivityId(activityId);
36-
#if FEATURE_MANAGED_ETW
36+
#if FEATURE_MANAGED_ETW && PLATFORM_WINDOWS
3737
#if FEATURE_ACTIVITYSAMPLING
3838
Guid newId = activityId;
3939
#endif // FEATURE_ACTIVITYSAMPLING
@@ -57,7 +57,7 @@ public static void SetCurrentThreadActivityId(Guid activityId)
5757
}
5858
#endif // FEATURE_ACTIVITYSAMPLING
5959
}
60-
#endif // FEATURE_MANAGED_ETW
60+
#endif // FEATURE_MANAGED_ETW && PLATFORM_WINDOWS
6161
}
6262

6363
/// <summary>

0 commit comments

Comments
 (0)