From a0fd0d95e297175c37fbad99016825680552bfda Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 2 Mar 2010 18:08:07 +0200 Subject: [PATCH] Fix large file support. * scripts/xsparse.c (read_map): Use fseeko. * src/incremen.c (write_directory_file): Likewise. --- scripts/xsparse.c | 5 +++-- src/incremen.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/xsparse.c b/scripts/xsparse.c index c77c3f5..7fd31d9 100644 --- a/scripts/xsparse.c +++ b/scripts/xsparse.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -279,8 +280,8 @@ read_map (FILE *ifp) sparse_map[i].numbytes = string_to_size (nbuf, NULL); } - fseek (ifp, ((ftell (ifp) + BLOCKSIZE - 1) / BLOCKSIZE) * BLOCKSIZE, - SEEK_SET); + fseeko (ifp, ((ftell (ifp) + BLOCKSIZE - 1) / BLOCKSIZE) * BLOCKSIZE, + SEEK_SET); } void diff --git a/src/incremen.c b/src/incremen.c index 7cad838..dc880cd 100644 --- a/src/incremen.c +++ b/src/incremen.c @@ -1410,7 +1410,7 @@ write_directory_file (void) if (! fp) return; - if (fseek (fp, 0L, SEEK_SET) != 0) + if (fseeko (fp, 0L, SEEK_SET) != 0) seek_error (listed_incremental_option); if (sys_truncate (fileno (fp)) != 0) truncate_error (listed_incremental_option); -- 2.45.2