mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
fixed gcc warning about struct stat
This commit is contained in:
parent
c03ae5fafd
commit
93d41b2c0e
@ -238,9 +238,7 @@ inline size_t filesize(FILE *f)
|
|||||||
int fd = fileno(f);
|
int fd = fileno(f);
|
||||||
// 64 bits(but not in osx or cygwin, where fstat64 is deprecated)
|
// 64 bits(but not in osx or cygwin, where fstat64 is deprecated)
|
||||||
#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__)
|
#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__)
|
||||||
struct stat64 st
|
struct stat64 st;
|
||||||
{
|
|
||||||
};
|
|
||||||
if (fstat64(fd, &st) == 0)
|
if (fstat64(fd, &st) == 0)
|
||||||
{
|
{
|
||||||
return static_cast<size_t>(st.st_size);
|
return static_cast<size_t>(st.st_size);
|
||||||
|
Loading…
Reference in New Issue
Block a user