From d619762b8eb9e0ef180018e8731744a5c9a8a6bd Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 10 Sep 2011 19:33:58 +0200 Subject: WIN32: mkdir takes only one argument --- src/userpref.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/userpref.c b/src/userpref.c index d44d5aa..f4e9fe6 100644 --- a/src/userpref.c +++ b/src/userpref.c @@ -133,10 +133,19 @@ static const char *userpref_get_config_dir() return __config_dir; } +static int __mkdir(const char *dir, int mode) +{ +#ifdef WIN32 + return mkdir(dir); +#else + return mkdir(dir, mode); +#endif +} + static int mkdir_with_parents(const char *dir, int mode) { if (!dir) return -1; - if (mkdir(dir, mode) == 0) { + if (__mkdir(dir, mode) == 0) { return 0; } else { if (errno == EEXIST) return 0; -- cgit v1.1-32-gdbae