We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b117a3d + 5ef7ea5 commit ff33da9Copy full SHA for ff33da9
mcs/class/System/System.Net.NetworkInformation/IPGlobalProperties.cs
@@ -59,8 +59,17 @@ public override string DhcpScopeName {
59
public override string DomainName {
60
get {
61
byte [] bytes = new byte [256];
62
- if (getdomainname (bytes, 256) != 0)
63
- throw new NetworkInformationException ();
+#if UNITY
+ try
64
+ {
65
+#endif
66
+ if (getdomainname (bytes, 256) != 0)
67
+ throw new NetworkInformationException ();
68
69
+ } catch (EntryPointNotFoundException) {
70
+ return String.Empty;
71
+ }
72
73
int len = Array.IndexOf<byte> (bytes, 0);
74
return Encoding.ASCII.GetString (bytes, 0, len < 0 ? 256 : len);
75
}
0 commit comments