diff options
| author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-01-17 17:09:59 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-01-17 17:09:59 -0800 |
| commit | 07f505971c16f25c05357b49ae550509d77a7e95 (patch) | |
| tree | 894cb8b07adea45f29381ef7371f4e7cde1f408f /node/Utils.cpp | |
| parent | 7eccc5ebf2c0f25b2091d1b618b901e69b97ac0a (diff) | |
| download | infinitytier-07f505971c16f25c05357b49ae550509d77a7e95.tar.gz infinitytier-07f505971c16f25c05357b49ae550509d77a7e95.zip | |
Windows build fixes.
Diffstat (limited to 'node/Utils.cpp')
| -rw-r--r-- | node/Utils.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/node/Utils.cpp b/node/Utils.cpp index 45d1aee8..53a67179 100644 --- a/node/Utils.cpp +++ b/node/Utils.cpp @@ -280,8 +280,12 @@ int64_t Utils::getFileSize(const char *path) struct stat s; if (stat(path,&s)) return -1; +#ifdef __WINDOWS__ + return s.st_size; +#else if (S_ISREG(s.st_mode)) return s.st_size; +#endif return -1; } |
