mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/win32-vd_agent
synced 2025-12-28 15:20:42 +00:00
vdlog: Fix compatibility with MSVC
_wstat64 documentation states that we should include sys/types.h and sys/stat.h. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
1da442ad73
commit
7aa46954fd
@ -21,6 +21,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <share.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <vector>
|
||||
|
||||
#define LOG_ROLL_SIZE (1024 * 1024)
|
||||
@ -46,7 +48,7 @@ VDLog* VDLog::get(TCHAR* path)
|
||||
if (_log || !path) {
|
||||
return _log;
|
||||
}
|
||||
__stat64 buf;
|
||||
struct _stat64 buf;
|
||||
if (_wstat64(path, &buf) == 0 && buf.st_size > LOG_ROLL_SIZE) {
|
||||
TCHAR roll_path[MAX_PATH];
|
||||
swprintf_s(roll_path, MAX_PATH, L"%s.1", path);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user