File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -766,8 +766,10 @@ test "sigaction" {
766766 }
767767 };
768768
769+ const actual_handler = if (builtin .zig_backend == .stage1 ) S .handler else & S .handler ;
770+
769771 var sa = os.Sigaction {
770- .handler = .{ .sigaction = S . handler },
772+ .handler = .{ .sigaction = actual_handler },
771773 .mask = os .empty_sigset ,
772774 .flags = os .SA .SIGINFO | os .SA .RESETHAND ,
773775 };
@@ -776,7 +778,7 @@ test "sigaction" {
776778 try os .sigaction (os .SIG .USR1 , & sa , null );
777779 // Check that we can read it back correctly.
778780 try os .sigaction (os .SIG .USR1 , null , & old_sa );
779- try testing .expectEqual (S . handler , old_sa .handler .sigaction .? );
781+ try testing .expectEqual (actual_handler , old_sa .handler .sigaction .? );
780782 try testing .expect ((old_sa .flags & os .SA .SIGINFO ) != 0 );
781783 // Invoke the handler.
782784 try os .raise (os .SIG .USR1 );
You can’t perform that action at this time.
0 commit comments