diff --git a/dcapi/common/util.c b/dcapi/common/util.c index ac28ce18f4..a36302e53f 100644 --- a/dcapi/common/util.c +++ b/dcapi/common/util.c @@ -5,11 +5,16 @@ #include #include #include -#include #include #include #include +#ifdef _WIN32 +#include +#else +#include +#endif + #include #include @@ -25,6 +30,14 @@ * Functions */ +#ifdef _WIN32 +int _DC_copyFile(const char *src, const char *dst) +{ + if (CopyFile(src, dst, FALSE)) + return 0; + return DC_ERR_SYSTEM; +} +#else int _DC_copyFile(const char *src, const char *dst) { struct stat s; @@ -95,6 +108,7 @@ error: errno = ret; return DC_ERR_SYSTEM; } +#endif /* _WIN32 */ long long _DC_processSuffix(const char *suffix) {