From 58e84b308c4351793defd1b6b06339261d5abdf4 Mon Sep 17 00:00:00 2001 From: Ben Gamari <ben@smart-cactus.org> Date: Wed, 19 Jun 2019 11:58:42 -0400 Subject: [PATCH] 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. --- testsuite/tests/concurrent/should_run/T5611.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testsuite/tests/concurrent/should_run/T5611.hs b/testsuite/tests/concurrent/should_run/T5611.hs index e46859d27ca..1b056178a26 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 () -- GitLab