X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fwin32%2Fcompat%2Fcompat.cpp;h=e93ce9c45b39d3beb4d2fc3f13f724f1892c5b7e;hb=a33d3671776f81795bb6bd649572d845a4bcea10;hp=cb1ebc9829da14839ed67c138e11c754427d12eb;hpb=01e51a683cd58183be5c42018f2e9598cfc17be5;p=bacula%2Fbacula diff --git a/bacula/src/win32/compat/compat.cpp b/bacula/src/win32/compat/compat.cpp index cb1ebc9829..e93ce9c45b 100644 --- a/bacula/src/win32/compat/compat.cpp +++ b/bacula/src/win32/compat/compat.cpp @@ -733,7 +733,7 @@ statDir(const char *file, struct stat *sb) } int -fstat(int fd, struct stat *sb) +fstat(intptr_t fd, struct stat *sb) { BY_HANDLE_FILE_INFORMATION info; @@ -827,7 +827,7 @@ stat2(const char *file, struct stat *sb) return -1; } - rval = fstat((int)h, sb); + rval = fstat((intptr_t)h, sb); CloseHandle(h); if (attr & FILE_ATTRIBUTE_DIRECTORY && @@ -2201,7 +2201,7 @@ open_bpipe(char *prog, int wait, const char *mode) // process terminates we can // detect eof. // ugly but convert WIN32 HANDLE to FILE* - int rfd = _open_osfhandle((long)hChildStdoutRdDup, O_RDONLY | O_BINARY); + int rfd = _open_osfhandle((intptr_t)hChildStdoutRdDup, O_RDONLY | O_BINARY); if (rfd >= 0) { bpipe->rfd = _fdopen(rfd, "rb"); } @@ -2210,7 +2210,7 @@ open_bpipe(char *prog, int wait, const char *mode) CloseHandle(hChildStdinRd); // close our read side so as not // to interfre with child's copy // ugly but convert WIN32 HANDLE to FILE* - int wfd = _open_osfhandle((long)hChildStdinWrDup, O_WRONLY | O_BINARY); + int wfd = _open_osfhandle((intptr_t)hChildStdinWrDup, O_WRONLY | O_BINARY); if (wfd >= 0) { bpipe->wfd = _fdopen(wfd, "wb"); } @@ -2316,6 +2316,7 @@ close_wpipe(BPIPE *bpipe) return result; } +#ifndef MINGW64 int utime(const char *fname, struct utimbuf *times) { @@ -2367,6 +2368,7 @@ utime(const char *fname, struct utimbuf *times) } return rval; } +#endif #if 0 int