]> Dogcows Code - chaz/tar/commitdiff
Fix large file support.
authorEric Blake <ebb9@byu.net>
Tue, 2 Mar 2010 16:08:07 +0000 (18:08 +0200)
committerSergey Poznyakoff <gray@gnu.org.ua>
Tue, 2 Mar 2010 16:08:07 +0000 (18:08 +0200)
* scripts/xsparse.c (read_map): Use fseeko.
* src/incremen.c (write_directory_file): Likewise.

scripts/xsparse.c
src/incremen.c

index c77c3f5ced78b0e1c96baf816726cdf754d59876..7fd31d9589a42ab2d4a9506ab50eb86830c9923a 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
+#include <string.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/stat.h>
@@ -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
index 7cad838a8e6e2d26b1b09e65801a2415a75de547..dc880cd88ce32f27d00dea401d3d98309346a7b6 100644 (file)
@@ -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);
This page took 0.020649 seconds and 4 git commands to generate.