Commit 1b62a6c
Guard WASI-incompatible POSIX APIs in accel.c with #ifndef __wasi__
The mmap_read, mmap_write, and recv_exact functions use poll.h,
sys/mman.h, and sys/socket.h which are unavailable in WASI. Wrap
these includes, function bodies, and PyMethodDef entries with
#ifndef __wasi__ guards so the C extension compiles for wasm32-wasip2.
The core call_function_accel optimization remains available.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent c732dff commit 1b62a6c
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
5298 | 5302 | | |
5299 | 5303 | | |
5300 | 5304 | | |
| 5305 | + | |
5301 | 5306 | | |
5302 | 5307 | | |
5303 | 5308 | | |
| |||
5444 | 5449 | | |
5445 | 5450 | | |
5446 | 5451 | | |
| 5452 | + | |
5447 | 5453 | | |
5448 | 5454 | | |
5449 | 5455 | | |
| |||
5452 | 5458 | | |
5453 | 5459 | | |
5454 | 5460 | | |
| 5461 | + | |
5455 | 5462 | | |
5456 | 5463 | | |
5457 | 5464 | | |
| 5465 | + | |
5458 | 5466 | | |
5459 | 5467 | | |
5460 | 5468 | | |
| |||
0 commit comments