From e038c8cc6818dab3f8ccd4d78ae8797d591cc13f Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Tue, 29 Nov 2022 23:32:10 -0500 Subject: Added in preprocessor guard. --- src/lpm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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] = '/'; } -- cgit v1.2.3