diff --git a/src/utils.c b/src/utils.c index 9bab473c5..9f00e687a 100644 --- a/src/utils.c +++ b/src/utils.c @@ -21,12 +21,16 @@ #include "../config.h" +#include + #include #include #include -#include #include -#include + +#ifndef WIN32 +#include +#endif #ifdef HAVE_IPV6 #include @@ -114,6 +118,7 @@ G_GNUC_MALLOC void *xcalloc(size_t nmemb, size_t size) char *parsePath(char *path) { +#ifndef WIN32 if (path[0] != '/' && path[0] != '~') { g_warning("\"%s\" is not an absolute path", path); return NULL; @@ -170,8 +175,11 @@ char *parsePath(char *path) strcat(newPath, path + pos); return newPath; } else { +#endif return xstrdup(path); +#ifndef WIN32 } +#endif } int set_nonblocking(int fd)