diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Networking/SockAddr.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Networking/SockAddr.cs index 7c2962b12b..ae4196153f 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Networking/SockAddr.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Networking/SockAddr.cs @@ -2,9 +2,11 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Net; +using System.Runtime.InteropServices; namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Networking { + [StructLayout(LayoutKind.Sequential)] public struct SockAddr { // this type represents native memory occupied by sockaddr struct