aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lpm.c')
-rw-r--r--src/lpm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lpm.c b/src/lpm.c
index 5b5eb1c..3e0021e 100644
--- a/src/lpm.c
+++ b/src/lpm.c
@@ -440,7 +440,11 @@ static int mkdirp(char* path, int len) {
for (int i = 0; i < len; ++i) {
if (path[i] == '/') {
path[i] = 0;
- if (mkdir(path, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) && errno != EEXIST)
+ #ifndef _WIN32
+ if (mkdir(path, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) && errno != EEXIST)
+ #else
+ if (mkdir(path) && errno != EEXIST)
+ #endif
return -1;
path[i] = '/';
}