From: Eric Blake Date: Tue, 2 Mar 2010 16:08:07 +0000 (+0200) Subject: Fix large file support. X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Ftar;a=commitdiff_plain;h=a0fd0d95e297175c37fbad99016825680552bfda Fix large file support. * scripts/xsparse.c (read_map): Use fseeko. * src/incremen.c (write_directory_file): Likewise. --- 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);