mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
gh-90473: Make chmod a dummy on WASI, skip chmod tests (GH-93534)
WASI does not have the ``chmod(2)`` syscall yet.
This commit is contained in:
parent
56b5daf159
commit
22fed605e0
20 changed files with 81 additions and 5 deletions
|
@ -3282,6 +3282,10 @@ os_chmod_impl(PyObject *module, path_t *path, int mode, int dir_fd,
|
|||
{
|
||||
#ifdef HAVE_CHMOD
|
||||
result = chmod(path->narrow, mode);
|
||||
#elif defined(__wasi__)
|
||||
// WASI SDK 15.0 does not support chmod.
|
||||
// Ignore missing syscall for now.
|
||||
result = 0;
|
||||
#else
|
||||
result = -1;
|
||||
errno = ENOSYS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue