From 782f96572dc871d7506829a908bec183325d5978 Mon Sep 17 00:00:00 2001 From: Petr Onderka Date: Sun, 25 Sep 2016 18:13:42 +0200 Subject: [PATCH] Specify sequential layout to avoid warning --- .../Internal/Networking/SockAddr.cs | 2 ++ 1 file changed, 2 insertions(+) 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