aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-10-24 20:09:52 -0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-10-24 20:09:52 -0200
commit0132cd9dcede55ce7af3858d88f5cf9bb3d259e6 (patch)
tree5ea87287c48f26aaf24e83f9f71525c6a0c23981 /src
parent22ccecd5caafe80f8670a9cceded41b268d3dda4 (diff)
downloadblogc-0132cd9dcede55ce7af3858d88f5cf9bb3d259e6.tar.gz
blogc-0132cd9dcede55ce7af3858d88f5cf9bb3d259e6.tar.bz2
blogc-0132cd9dcede55ce7af3858d88f5cf9bb3d259e6.zip
main: fix build on windows
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 3b2a9ef..d6fa595 100644
--- a/src/main.c
+++ b/src/main.c
@@ -78,7 +78,11 @@ blogc_mkdir_recursive(const char *filename)
char bkp = *tmp;
*tmp = '\0';
if ((strlen(fname) > 0) &&
+#if defined(WIN32) || defined(_WIN32)
+ (-1 == mkdir(fname)) &&
+#else
(-1 == mkdir(fname, 0777)) &&
+#endif
(errno != EEXIST))
{
fprintf(stderr, "blogc: error: failed to create output "