summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-06-19 11:58:42 -0400
committerBen Gamari <ben@well-typed.com>2019-06-26 08:18:25 -0400
commit58e84b308c4351793defd1b6b06339261d5abdf4 (patch)
treebe10357ca706b96c19e6946d810b33bc8f40d67d
parente0899925b065813821f1bab43e2b0c4cc434633a (diff)
downloadhaskell-58e84b308c4351793defd1b6b06339261d5abdf4.tar.gz
testsuite: Use safe FFI call in T5611
The original issue, #5611, was concerned with safe calls. However, the test inexplicably used an unsafe call. Fix this.
-rw-r--r--testsuite/tests/concurrent/should_run/T5611.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/tests/concurrent/should_run/T5611.hs b/testsuite/tests/concurrent/should_run/T5611.hs
index e46859d27c..1b056178a2 100644
--- a/testsuite/tests/concurrent/should_run/T5611.hs
+++ b/testsuite/tests/concurrent/should_run/T5611.hs
@@ -4,12 +4,12 @@ import Control.Concurrent
import Foreign.C
import System.IO
-#ifdef mingw32_HOST_OS
+#if defined(mingw32_HOST_OS)
sleep n = sleepBlock (n*1000)
-foreign import stdcall unsafe "Sleep" sleepBlock :: Int -> IO ()
+foreign import stdcall safe "Sleep" sleepBlock :: Int -> IO ()
#else
sleep n = sleepBlock n
-foreign import ccall unsafe "sleep" sleepBlock :: Int -> IO ()
+foreign import ccall safe "sleep" sleepBlock :: Int -> IO ()
#endif
main :: IO ()