diff options
| author | Christian Heimes <christian@python.org> | 2022-07-26 11:16:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-26 11:16:51 +0200 |
| commit | 0d35a59ce3242b7326890a8c8cc41b321192ec9a (patch) | |
| tree | 0d165365dff1a2131594c209d16719aca25813eb /Modules/selectmodule.c | |
| parent | e8f3e8f0ab8aa5d667229ce9694e6e1477e524fd (diff) | |
| download | cpython-git-0d35a59ce3242b7326890a8c8cc41b321192ec9a.tar.gz | |
gh-95174: Handle missing dup() and constants in WASI (GH-95229)
- check for ``dup()`` libc function
- handle missing ``F_DUPFD`` in ``dup2()`` replacement function
- add workaround for WASI libc bug in MSG_TRUNC
- ESHUTDOWN is missing, use EPIPE instead
- POLLPRI is missing, define as 0 (no-op)
Diffstat (limited to 'Modules/selectmodule.c')
| -rw-r--r-- | Modules/selectmodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index 5c36eaaede..4eea928a26 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -63,6 +63,11 @@ extern void bzero(void *, int); # define SOCKET int #endif +// WASI SDK 16 does not have POLLPRIO, define as no-op +#if defined(__wasi__) && !defined(POLLPRI) +# define POLLPRI 0 +#endif + typedef struct { PyObject *close; PyTypeObject *poll_Type; |
