2009-09-24 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Thu, 24 Sep 2009 14:34:43 +0000 (14:34 -0000)
committerZoltan Varga <vargaz@gmail.com>
Thu, 24 Sep 2009 14:34:43 +0000 (14:34 -0000)
* LinuxNetworkInterfaceMarshal.cs: Add StructLayout attribute to structures, so
the aot compiler can generate PtrToStructure wrappers for them.

svn path=/trunk/mcs/; revision=142578

mcs/class/System/System.Net.NetworkInformation/ChangeLog
mcs/class/System/System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs

index 4383a32af2fd0e49aaaf93f60669798ac1c8bd6c..1763e50aa7c54fd7ff43485252468cbc1d087461 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-24  Zoltan Varga  <vargaz@gmail.com>
+
+       * LinuxNetworkInterfaceMarshal.cs: Add StructLayout attribute to structures, so
+       the aot compiler can generate PtrToStructure wrappers for them.
+
 2009-09-19 Gonzalo Paniagua Javier <gonzalo@novell.com>
 
        * Ping.cs: if we receive a packet that is ignored, adjust the
index 8658a2e1c4bd7ea161a5184e859fd1c5352f4d41..ace0845bb7d99599b5afdb303b6ca51980c548e0 100644 (file)
@@ -40,6 +40,7 @@ namespace System.Net.NetworkInformation {
                public IntPtr ifu_dstaddr; 
        }
 
+       [StructLayout(LayoutKind.Sequential)]
        struct ifaddrs
        {
                public IntPtr  ifa_next;
@@ -50,7 +51,8 @@ namespace System.Net.NetworkInformation {
                public ifa_ifu ifa_ifu;
                public IntPtr  ifa_data;
        }
-       
+
+       [StructLayout(LayoutKind.Sequential)]   
        struct sockaddr_in
        {
                public ushort sin_family;
@@ -58,6 +60,7 @@ namespace System.Net.NetworkInformation {
                public uint   sin_addr;
        }
 
+       [StructLayout(LayoutKind.Sequential)]
        struct sockaddr_in6
        {
                public ushort   sin6_family;   /* AF_INET6 */
@@ -67,12 +70,14 @@ namespace System.Net.NetworkInformation {
                public uint     sin6_scope_id; /* scope id (new in RFC2553) */
        }
 
+       [StructLayout(LayoutKind.Sequential)]
        struct in6_addr
        {
                [MarshalAs (UnmanagedType.ByValArray, SizeConst=16)]
                public byte[] u6_addr8;
        }
 
+       [StructLayout(LayoutKind.Sequential)]
        struct sockaddr_ll
        {
                public ushort sll_family;