Skip to content

Commit

Permalink
fix: tc_port stat support big file
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanshudong committed Dec 13, 2024
1 parent 7139b70 commit 8615d85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion util/include/util/tc_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class UTIL_DLL_API TC_Port
static int chmod(const char *path, mode_t mode);

#if TARGET_PLATFORM_WINDOWS
typedef struct _stat stat_t;
typedef struct _stat64 stat_t;
#else
typedef struct stat stat_t;
#endif
Expand Down
4 changes: 2 additions & 2 deletions util/src/tc_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ FILE * TC_Port::fopen(const char * path, const char * mode)
int TC_Port::stat(const char * path, stat_t * buf)
{
#if TARGET_PLATFORM_WINDOWS
return ::_stat(path, buf);
return ::_stat64(path, buf);
#else
return ::stat(path, buf);
#endif
Expand All @@ -213,7 +213,7 @@ int TC_Port::stat(const char * path, stat_t * buf)
int TC_Port::lstat(const char * path, TC_Port::stat_t * buf)
{
#if TARGET_PLATFORM_WINDOWS
return ::_stat(path, buf);
return ::_stat64(path, buf);
#else
return ::lstat(path, buf);
#endif
Expand Down

0 comments on commit 8615d85

Please sign in to comment.