Include header declaring mkdir and set mode when creating directory.
authorSebastian Rasmussen <[email protected]>
Sun, 2 Apr 2023 02:34:54 +0000 (04:34 +0200)
committerSebastian Rasmussen <[email protected]>
Mon, 3 Apr 2023 16:14:14 +0000 (18:14 +0200)
platform/gl/gl-main.c
platform/x11/pdfapp.c
source/tools/mudraw.c

index 5eefd005ef59f8bc366a4942b6e5293a71146b16..063a08924df6d46c00393b8cc39eb7078396d355 100644 (file)
@@ -42,6 +42,7 @@
 #endif
 
 #ifndef _WIN32
+#include <sys/stat.h> /* for mkdir */
 #include <unistd.h> /* for getcwd */
 #include <spawn.h> /* for posix_spawn */
 extern char **environ; /* see environ (7) */
@@ -512,7 +513,7 @@ fz_mkdir(char *path)
 
        return ret;
 #else
-       return mkdir(path);
+       return mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO);
 #endif
 }
 
index 4042f90109de7879f463528f7c350f5b5461cb56..ddd2e352e1f6b7c761f8bee8814829c287180e14 100644 (file)
@@ -12,6 +12,7 @@
 #include <direct.h> /* for getcwd */
 #else
 #include <unistd.h> /* for getcwd */
+#include <sys/stat.h> /* for mkdir */
 #endif
 
 #define BEYOND_THRESHHOLD 40
@@ -40,7 +41,7 @@ fz_mkdir(char *path)
 
        return ret;
 #else
-       return mkdir(path);
+       return mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO);
 #endif
 }
 
index f68aa8972bb38ccd528f1781f358c2f5ecb168a3..aefbc7a88894af15d453010277d52bbfd659c943 100644 (file)
@@ -49,6 +49,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz);
 #include <windows.h>
 #include <direct.h> /* for getcwd */
 #else
+#include <sys/stat.h> /* for mkdir */
 #include <unistd.h> /* for getcwd */
 #endif
 
@@ -1900,7 +1901,7 @@ fz_mkdir(char *path)
 
        return ret;
 #else
-       return mkdir(path);
+       return mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO);
 #endif
 }