From d518e8f1a6f111575aba37bb0b0ba00168ad7fcd Mon Sep 17 00:00:00 2001
From: Duncan Coutts <duncan@well-typed.com>
Date: Mon, 31 Oct 2011 11:39:15 +0000
Subject: Fix recent rts flags changes on windows

I naively assumed that mingw would not have unistd.h or sys/types
but it has both, yet does not have getuid() and friends.
---
 rts/RtsFlags.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'rts/RtsFlags.c')

diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index c3784ad2ee..bd2bf6748d 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -536,7 +536,7 @@ void setupRtsFlags (int *argc, char *argv[])
 
 static void checkSuid(RtsOptsEnabledEnum enabled)
 {
-#if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_TYPES_H)
+#if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_TYPES_H) && !defined(mingw32_HOST_OS)
     if (enabled == RtsOptsSafeOnly) {
 	/* This doesn't cover linux/posix capabilities like CAP_DAC_OVERRIDE,
 	   we'd have to link with -lcap for that. */
-- 
cgit v1.2.1