Browse Source

Fix the moonlight build

Jb Evain 15 years ago
parent
commit
1bf14c018e
1 changed files with 8 additions and 0 deletions
  1. 8 0
      mcs/class/System/System.Net.Sockets/Socket_2_1.cs

+ 8 - 0
mcs/class/System/System.Net.Sockets/Socket_2_1.cs

@@ -485,7 +485,11 @@ namespace System.Net.Sockets {
 				throw new ArgumentNullException ("remoteEP");
 
 			IPEndPoint ep = remoteEP as IPEndPoint;
+#if !MOONLIGHT
 			if (ep != null && socket_type != SocketType.Dgram) /* Dgram uses Any to 'disconnect' */
+#else
+			if (ep != null)
+#endif
 				if (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any))
 					throw new SocketException ((int) SocketError.AddressNotAvailable);
 
@@ -516,8 +520,12 @@ namespace System.Net.Sockets {
 			if (error != 0)
 				throw new SocketException (error);
 
+#if !MOONLIGHT
 			if (socket_type != SocketType.Dgram)
 				connected=true;
+#else
+			connected = true;
+#endif
 
 #if NET_2_0
 			isbound = true;