@@ -3578,13 +3578,13 @@ pub fn getAllErrorsAlloc(self: *MachO) !ErrorBundle {
35783578}
35793579
35803580fn renderWarningToStdErr (eb : ErrorBundle ) void {
3581- std . debug . lockStdErr () ;
3582- defer std .debug .unlockStdErr ( );
3583- const stderr = std .io . getStdErr ();
3584- return renderWarningToWriter (eb , stderr . writer () ) catch return ;
3581+ var buffer : [ 256 ] u8 = undefined ;
3582+ const w = std .debug .lockStderrWriter ( & buffer );
3583+ defer std .debug . unlockStderrWriter ();
3584+ return renderWarningToWriter (eb , w ) catch return ;
35853585}
35863586
3587- fn renderWarningToWriter (eb : ErrorBundle , writer : anytype ) ! void {
3587+ fn renderWarningToWriter (eb : ErrorBundle , writer : * Writer ) ! void {
35883588 for (eb .getMessages ()) | msg | {
35893589 try renderWarningMessageToWriter (eb , msg , writer , "warning" , .cyan , 0 );
35903590 }
@@ -3593,12 +3593,12 @@ fn renderWarningToWriter(eb: ErrorBundle, writer: anytype) !void {
35933593fn renderWarningMessageToWriter (
35943594 eb : ErrorBundle ,
35953595 err_msg_index : ErrorBundle.MessageIndex ,
3596- stderr : anytype ,
3596+ stderr : * Writer ,
35973597 kind : []const u8 ,
35983598 color : std.io.tty.Color ,
35993599 indent : usize ,
36003600) anyerror ! void {
3601- const ttyconf = std .io .tty .detectConfig (std .io . getStdErr ());
3601+ const ttyconf = std .io .tty .detectConfig (std .fs . File . stderr ());
36023602 const err_msg = eb .getErrorMessage (err_msg_index );
36033603 try ttyconf .setColor (stderr , color );
36043604 try stderr .writeByteNTimes (' ' , indent );
@@ -3623,7 +3623,7 @@ pub fn reportErrors(self: *MachO) void {
36233623 var errors = self .getAllErrorsAlloc () catch @panic ("OOM" );
36243624 defer errors .deinit (self .allocator );
36253625 if (errors .errorMessageCount () > 0 ) {
3626- errors .renderToStdErr (.{ .ttyconf = std .io .tty .detectConfig (std .io . getStdErr ()) });
3626+ errors .renderToStdErr (.{ .ttyconf = std .io .tty .detectConfig (std .fs . File . stderr ()) });
36273627 }
36283628}
36293629
@@ -3692,3 +3692,4 @@ const TlvPtrSection = synthetic.TlvPtrSection;
36923692const UnwindInfo = @import ("UnwindInfo.zig" );
36933693const WaitGroup = std .Thread .WaitGroup ;
36943694const WeakBind = synthetic .WeakBind ;
3695+ const Writer = std .Io .Writer ;
0 commit comments