summaryrefslogtreecommitdiff
path: root/src/stat/chmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stat/chmod.c')
-rw-r--r--src/stat/chmod.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stat/chmod.c b/src/stat/chmod.c
index beb66e59..d4f53c56 100644
--- a/src/stat/chmod.c
+++ b/src/stat/chmod.c
@@ -1,7 +1,12 @@
#include <sys/stat.h>
+#include <fcntl.h>
#include "syscall.h"
int chmod(const char *path, mode_t mode)
{
+#ifdef SYS_chmod
return syscall(SYS_chmod, path, mode);
+#else
+ return syscall(SYS_fchmodat, AT_FDCWD, path, mode);
+#endif
}