From f55c2d305d810e494688bef11e6d82d29f3f2d34 Mon Sep 17 00:00:00 2001 From: water Date: Tue, 8 Sep 2020 19:49:58 -0400 Subject: [PATCH] another fix --- goalc/compiler/Compiler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/goalc/compiler/Compiler.cpp b/goalc/compiler/Compiler.cpp index 29c5c4d95f..1edede33bd 100644 --- a/goalc/compiler/Compiler.cpp +++ b/goalc/compiler/Compiler.cpp @@ -3,7 +3,8 @@ #include "common/link_types.h" #include "IR.h" #include "goalc/regalloc/allocate.h" -#include "unistd.h" +#include +#include using namespace goos; @@ -167,7 +168,7 @@ std::vector Compiler::run_test(const std::string& source_code) { if (!m_listener.is_connected()) { for (int i = 0; i < 1000; i++) { m_listener.connect_to_target(); - usleep(10000); + std::this_thread::sleep_for(std::chrono::microseconds(10000)); if (m_listener.is_connected()) { break; }