diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-08-31 07:06:51 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2018-08-31 16:56:37 +0300 |
commit | 74a91c7dbcdce334cab556a7d36210721e831573 (patch) | |
tree | 05dc524768d0d82ee6288878a3423533e448308f | |
parent | d7e9cc3e11ce0c12434bdbd229696caa1916eb69 (diff) |
Fix build break in CoreRT/ProjectN
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs | 7 |
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; } |