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)
This commit is contained in:
Christian Heimes
2022-07-26 11:16:51 +02:00
committed by GitHub
parent e8f3e8f0ab
commit 0d35a59ce3
12 changed files with 47 additions and 5 deletions

View File

@@ -678,6 +678,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* Define if you have the 'inet_pton' function. */
#define HAVE_INET_PTON 1
/* Define to 1 if you have the `dup' function. */
#define HAVE_DUP 1
/* framework name */
#define _PYTHONFRAMEWORK ""