Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2018-08-31 07:06:51 +0300
committerJan Kotas <jkotas@microsoft.com>2018-08-31 16:56:37 +0300
commit74a91c7dbcdce334cab556a7d36210721e831573 (patch)
tree05dc524768d0d82ee6288878a3423533e448308f
parentd7e9cc3e11ce0c12434bdbd229696caa1916eb69 (diff)
Fix build break in CoreRT/ProjectN
-rw-r--r--src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
index 10131124f..1f8c0b06a 100644
--- a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
+++ b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
@@ -1785,7 +1785,12 @@ namespace System.Diagnostics.Tracing
if (dataType.IsEnum())
{
dataType = Enum.GetUnderlyingType(dataType);
- if (Runtime.InteropServices.Marshal.SizeOf(dataType) < sizeof(int))
+#if ES_BUILD_PN
+ int dataTypeSize = (int)dataType.TypeHandle.ToEETypePtr().ValueTypeSize;
+#else
+ int dataTypeSize = System.Runtime.InteropServices.Marshal.SizeOf(dataType);
+#endif
+ if (dataTypeSize < sizeof(int))
dataType = typeof(int);
goto Again;
}