forked from pool/ktorrent
18 lines
335 B
Diff
18 lines
335 B
Diff
--- libbtcore/diskio/cachefile.cpp
|
|
+++ libbtcore/diskio/cachefile.cpp
|
|
@@ -484,9 +484,13 @@ namespace bt
|
|
openFile(READ);
|
|
close_again = true;
|
|
}
|
|
-
|
|
+#ifdef HAVE_FSTAT64
|
|
+ struct stat64 sb;
|
|
+ if (fstat64(fd,&sb) == 0)
|
|
+#else
|
|
struct stat sb;
|
|
if (fstat(fd,&sb) == 0)
|
|
+#endif
|
|
{
|
|
ret = (Uint64)sb.st_blocks * 512;
|
|
}
|