summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 21adf80..904f8bf 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -3292,7 +3292,14 @@ os_chmod_impl(PyObject *module, path_t *path, int mode, int dir_fd,
}
else
#endif /* HAVE_FHCMODAT */
+ {
+#ifdef HAVE_CHMOD
result = chmod(path->narrow, mode);
+#else
+ result = -1;
+ errno = ENOSYS;
+#endif
+ }
Py_END_ALLOW_THREADS
if (result) {
@@ -4885,6 +4892,7 @@ os_system_impl(PyObject *module, PyObject *command)
#endif /* HAVE_SYSTEM */
+#ifdef HAVE_UMASK
/*[clinic input]
os.umask
@@ -4903,6 +4911,7 @@ os_umask_impl(PyObject *module, int mask)
return posix_error();
return PyLong_FromLong((long)i);
}
+#endif
#ifdef MS_WINDOWS