@@ -26,7 +26,7 @@ main = defaultMainWithHooks hk
27compileCheck :: FilePath -> String -> String -> String -> IO Bool
27compileCheck :: FilePath -> String -> String -> String -> IO Bool
28compileCheck cc testName message sourceCode = do
28compileCheck cc testName message sourceCode = do
29− withTempDirectory normal "" testName $ \tmpDir -> do
29+ withTempDirectory normal "" testName $ \tmpDir -> do
30 writeFile (tmpDir ++ "/" ++ testName ++ ".c") sourceCode
30 writeFile (tmpDir ++ "/" ++ testName ++ ".c") sourceCode
31 ec <- myRawSystemExitCode normal cc [tmpDir </> testName ++ ".c", "-o", tmpDir ++ "/a","-no-hs-main"]
31 ec <- myRawSystemExitCode normal cc [tmpDir </> testName ++ ".c", "-o", tmpDir ++ "/a","-no-hs-main"]
32 notice normal $ message ++ show (ec == ExitSuccess)
32 notice normal $ message ++ show (ec == ExitSuccess)
@@ -54,7 +54,7 @@ checkRDRAND cc lbi = do
55checkGetrandom :: FilePath -> LocalBuildInfo -> IO LocalBuildInfo
55checkGetrandom :: FilePath -> LocalBuildInfo -> IO LocalBuildInfo
56checkGetrandom cc lbi = do
56checkGetrandom cc lbi = do
57− libcGetrandom <- compileCheck cc "testLibcGetrandom" "Result of libc getrandom() Test: "
57+ libcGetrandom <- compileCheck cc "testLibcGetrandom" "Result of libc getrandom() Test: "
58 (unlines [ "#define _GNU_SOURCE"
58 (unlines [ "#define _GNU_SOURCE"
59 , "#include <errno.h>"
59 , "#include <errno.h>"
60 , "#include <sys/random.h>"
60 , "#include <sys/random.h>"
@@ -65,8 +65,8 @@ checkGetrandom cc lbi = do
65 , " return getrandom(&tmp, sizeof(tmp), GRND_NONBLOCK) != -1;"
65 , " return getrandom(&tmp, sizeof(tmp), GRND_NONBLOCK) != -1;"
68− if libcGetrandom then return $ addOptions cArgsLibc cArgsLibc lbi
68+ if libcGetrandom then return $ addOptions cArgsLibc cArgsLibc lbi
70 syscallGetrandom <- compileCheck cc "testSyscallGetrandom" "Result of syscall getrandom() Test: "
70 syscallGetrandom <- compileCheck cc "testSyscallGetrandom" "Result of syscall getrandom() Test: "
71 (unlines [ "#define _GNU_SOURCE"
71 (unlines [ "#define _GNU_SOURCE"
72 , "#include <errno.h>"
72 , "#include <errno.h>"