diff --git a/lib/system/io.nim b/lib/system/io.nim index 62722140fd78b..b6e82d7a05442 100644 --- a/lib/system/io.nim +++ b/lib/system/io.nim @@ -610,7 +610,7 @@ when declared(stdout): android_log_print(ANDROID_LOG_VERBOSE, "nim", s) else: # flockfile deadlocks some versions of Android 5.x.x - when not defined(windows) and not defined(android) and not defined(nintendoswitch): + when not defined(windows) and not defined(android) and not defined(nintendoswitch) and hostOS != "ansic": proc flockfile(f: File) {.importc, nodecl.} proc funlockfile(f: File) {.importc, nodecl.} flockfile(stdout) @@ -624,7 +624,7 @@ when declared(stdout): const linefeed = "\n" discard c_fwrite(linefeed.cstring, linefeed.len, 1, stdout) discard c_fflush(stdout) - when not defined(windows) and not defined(android) and not defined(nintendoswitch): + when not defined(windows) and not defined(android) and not defined(nintendoswitch) and hostOS != "ansic": funlockfile(stdout) when defined(windows) and compileOption("threads"): releaseSys echoLock