aboutsummaryrefslogtreecommitdiffstats
path: root/ports/unix/guts/mkdirat.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/unix/guts/mkdirat.c')
-rw-r--r--ports/unix/guts/mkdirat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/unix/guts/mkdirat.c b/ports/unix/guts/mkdirat.c
index 5f80b50..668d6ac 100644
--- a/ports/unix/guts/mkdirat.c
+++ b/ports/unix/guts/mkdirat.c
@@ -30,6 +30,11 @@
if (stat_rc != -1) {
buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, mode);
pseudo_client_op(OP_MKDIR, 0, -1, dirfd, path, &buf);
+#ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
+ real_fchmod(path, PSEUDO_FS_MODE(mode, 1));
+#else
+ real_fchmodat(dirfd, path, PSEUDO_FS_MODE(mode, 1), AT_SYMLINK_NOFOLLOW);
+#endif
} else {
pseudo_debug(PDBGF_OP, "mkdir of %s succeeded, but stat failed: %s\n",
path, strerror(errno));