summaryrefslogtreecommitdiff
path: root/ghc/lib/std/cbits/getLock.c
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/lib/std/cbits/getLock.c')
-rw-r--r--ghc/lib/std/cbits/getLock.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ghc/lib/std/cbits/getLock.c b/ghc/lib/std/cbits/getLock.c
index 756457c957..9d392c3ea7 100644
--- a/ghc/lib/std/cbits/getLock.c
+++ b/ghc/lib/std/cbits/getLock.c
@@ -1,7 +1,7 @@
/*
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
*
- * $Id: getLock.c,v 1.5 1999/03/01 09:11:39 sof Exp $
+ * $Id: getLock.c,v 1.6 1999/05/05 10:33:16 sof Exp $
*
* stdin/stout/stderr Runtime Support
*/
@@ -52,7 +52,14 @@ int exclusive;
while (fstat(fd, &sb) < 0) {
if (errno != EINTR) {
+#ifndef _WIN32
return -1;
+#else
+ /* fstat()ing socket fd's seems to fail with CRT's fstat(),
+ so let's just silently return and hope for the best..
+ */
+ return 0;
+#endif
}
}