summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-02-28 23:01:13 +0100
committerwm4 <wm4@mplayer2.org>2012-02-28 23:01:13 +0100
commit4b553cd676eadc21a68ac63ec71cca10e44cf5e8 (patch)
tree966abfc8a9a72e06e8040c698dc2866e871b51cf
parente00f4992b8debc2274e9165507d6e8130ac10289 (diff)
downloadmpv-4b553cd676eadc21a68ac63ec71cca10e44cf5e8.tar.bz2
mpv-4b553cd676eadc21a68ac63ec71cca10e44cf5e8.tar.xz
struct stat.st_blocks is not available on MinGW
-rw-r--r--timeline/tl_matroska.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/timeline/tl_matroska.c b/timeline/tl_matroska.c
index cbc10a874f..16d021ddfd 100644
--- a/timeline/tl_matroska.c
+++ b/timeline/tl_matroska.c
@@ -39,7 +39,7 @@
struct find_entry {
char *name;
int matchlen;
- blkcnt_t size;
+ off_t size;
};
static int cmp_entry(const void *pa, const void *pb)
@@ -50,7 +50,7 @@ static int cmp_entry(const void *pa, const void *pb)
if (matchdiff)
return FFSIGN(matchdiff);
// check small files first
- blkcnt_t sizediff = a->size - b->size;
+ off_t sizediff = a->size - b->size;
if (sizediff)
return FFSIGN(sizediff);
return 0;
@@ -92,11 +92,11 @@ static char **find_files(const char *original_file, const char *suffix)
struct stat statbuf;
if (stat(name, &statbuf) != 0)
continue;
- blkcnt_t bsize = statbuf.st_blocks;
+ off_t size = statbuf.st_size;
entries = talloc_realloc(entries, entries, struct find_entry,
num_results + 1);
- entries[num_results] = (struct find_entry) { name, matchlen, bsize };
+ entries[num_results] = (struct find_entry) { name, matchlen, size };
num_results++;
}
closedir(dp);