File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -149,3 +149,20 @@ type (
149
149
}
150
150
}
151
151
)
152
+
153
+ // Need to stub these for `os/signal`, but wasi doesn't support signals.
154
+
155
+ //go:linkname signal_disable os/signal.signal_disable
156
+ func signal_disable (uint32 ) {}
157
+
158
+ //go:linkname signal_enable os/signal.signal_enable
159
+ func signal_enable (uint32 ) {}
160
+
161
+ //go:linkname signal_ignore os/signal.signal_ignore
162
+ func signal_ignore (uint32 ) {}
163
+
164
+ //go:linkname signal_ignored os/signal.signal_ignored
165
+ func signal_ignored (uint32 ) bool { return false }
166
+
167
+ //go:linkname signal_recv os/signal.signal_recv
168
+ func signal_recv () uint32 { return ^ uint32 (0 ) }
Original file line number Diff line number Diff line change @@ -50,3 +50,20 @@ func sleepTicks(d timeUnit) {
50
50
func ticks () timeUnit {
51
51
return timeUnit (monotonicclock .Now ())
52
52
}
53
+
54
+ // Need to stub these for `os/signal`, but wasi doesn't support signals.
55
+
56
+ //go:linkname signal_disable os/signal.signal_disable
57
+ func signal_disable (uint32 ) {}
58
+
59
+ //go:linkname signal_enable os/signal.signal_enable
60
+ func signal_enable (uint32 ) {}
61
+
62
+ //go:linkname signal_ignore os/signal.signal_ignore
63
+ func signal_ignore (uint32 ) {}
64
+
65
+ //go:linkname signal_ignored os/signal.signal_ignored
66
+ func signal_ignored (uint32 ) bool { return false }
67
+
68
+ //go:linkname signal_recv os/signal.signal_recv
69
+ func signal_recv () uint32 { return ^ uint32 (0 ) }
You can’t perform that action at this time.
0 commit comments