projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a5206c4
)
Don't invoke libc uname() on non-Unix systems
author
Jeffrey Stedfast
<jeff@xamarin.com>
Tue, 26 Jul 2011 22:40:38 +0000
(18:40 -0400)
committer
Jeffrey Stedfast
<jeff@xamarin.com>
Tue, 26 Jul 2011 22:40:38 +0000
(18:40 -0400)
mcs/class/System/System/Platform.cs
patch
|
blob
|
history
diff --git
a/mcs/class/System/System/Platform.cs
b/mcs/class/System/System/Platform.cs
index a953e83a31c4a61d7c8efca7423dced952bf44c6..823063b5624b2854e829d362c09c5f3b5b7b1701 100644
(file)
--- a/
mcs/class/System/System/Platform.cs
+++ b/
mcs/class/System/System/Platform.cs
@@
-23,6
+23,7
@@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System;
using System.Runtime.InteropServices;
namespace System {
using System.Runtime.InteropServices;
namespace System {
@@
-35,6
+36,9
@@
namespace System {
public static bool IsMacOS {
get {
public static bool IsMacOS {
get {
+ if (Environment.OSVersion.Platform != PlatformID.Unix)
+ return false;
+
if (!checkedIsMacOS) {
IntPtr buf = Marshal.AllocHGlobal (8192);
if (uname (buf) == 0) {
if (!checkedIsMacOS) {
IntPtr buf = Marshal.AllocHGlobal (8192);
if (uname (buf) == 0) {