--- a/libidav/utils.h Tue Jul 11 20:45:32 2017 +0200 +++ b/libidav/utils.h Thu Aug 03 10:37:52 2017 +0200 @@ -29,16 +29,22 @@ #ifndef UTILS_H #define UTILS_H +#ifdef _WIN32 +#include <winsock2.h> +#include <io.h> +#endif /* _WIN32 */ + #include <sys/types.h> #include <libxml/tree.h> #include <ucx/string.h> #include <sys/stat.h> #include <inttypes.h> + #include <curl/curl.h> #include "webdav.h" -#ifdef _WIN32 -#include <io.h> +#ifndef S_IRWXG +/* if one is not defined, the others are probably also not defined */ #define S_IRWXG 070 #define S_IRGRP 040 #define S_IWGRP 020 @@ -47,7 +53,7 @@ #define S_IROTH 04 #define S_IWOTH 02 #define S_IXOTH 01 -#endif /* _WIN32 */ +#endif /* S_IRWXG */ #ifdef __cplusplus extern "C" {