diff --git a/Sources/hylo-lsp-server/hylo-lsp-server-cli.swift b/Sources/hylo-lsp-server/hylo-lsp-server-cli.swift index b7fe207..79ea473 100644 --- a/Sources/hylo-lsp-server/hylo-lsp-server-cli.swift +++ b/Sources/hylo-lsp-server/hylo-lsp-server-cli.swift @@ -98,8 +98,13 @@ struct HyloLspCommand: AsyncParsableCommand { #if !os(Windows) // Force line buffering - setvbuf(stdout, nil, _IOLBF, 0) - setvbuf(stderr, nil, _IOLBF, 0) + _ = withUnsafeMutablePointer(to: &stdout) { stdoutPointer in + setvbuf(stdoutPointer.pointee, nil, _IOLBF, 0) + } + + _ = withUnsafeMutablePointer(to: &stderr) { stderrPointer in + setvbuf(stderrPointer.pointee, nil, _IOLBF, 0) + } #endif let logFileURL = URL(fileURLWithPath: logFile)