Index: libbb/all_read.c
===================================================================
RCS file: /cvs/familiar/dist/ipkg/C/libbb/all_read.c,v
retrieving revision 1.1
diff -u -r1.1 all_read.c
--- C/libbb/all_read.c	5 Feb 2005 21:51:36 -0000	1.1
+++ C/libbb/all_read.c	21 Feb 2005 23:46:39 -0000
@@ -24,11 +24,11 @@
 #include <errno.h>
 #include "libbb.h"
 
-extern void archive_xread_all(int fd , char *buf, size_t count)
+extern void archive_xread_all(FILE *f, char *buf, size_t count)
 {
         ssize_t size;
 
-        size = full_read(fd, buf, count);
+        size = full_read(f, buf, count);
         if (size != count) {
                 perror_msg_and_die("Short read");
         }
@@ -41,7 +41,7 @@
  * Returns the amount read, or -1 on an error.
  * A short read is returned on an end of file.
  */
-ssize_t full_read(int fd, char *buf, int len)
+ssize_t full_read(FILE *f, char *buf, int len)
 {
         ssize_t cc;
         ssize_t total;
@@ -49,7 +49,7 @@
         total = 0;
 
         while (len > 0) {
-                cc = safe_read(fd, buf, len);
+                cc = safe_read(f, buf, len);
 
                 if (cc < 0)
                         return cc;      /* read() returns -1 on failure. */
@@ -66,12 +66,12 @@
 }
 
 
-ssize_t safe_read(int fd, void *buf, size_t count)
+ssize_t safe_read(FILE *f, void *buf, size_t count)
 {
         ssize_t n;
 
         do {
-                n = read(fd, buf, count);
+                n = fread(buf, 1, count, f);
         } while (n < 0 && errno == EINTR);
 
         return n;
Index: libbb/libbb.h
===================================================================
RCS file: /cvs/familiar/dist/ipkg/C/libbb/libbb.h,v
retrieving revision 1.4
diff -u -r1.4 libbb.h
--- C/libbb/libbb.h	7 Feb 2005 23:14:12 -0000	1.4
+++ C/libbb/libbb.h	21 Feb 2005 23:46:39 -0000
@@ -95,7 +95,7 @@
 extern void vherror_msg(const char *s, va_list p);
 extern void herror_msg(const char *s, ...);
 extern void herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn));
-extern void archive_xread_all(int fd, char *buf, size_t count);
+extern void archive_xread_all(FILE *f, char *buf, size_t count);
 
 /* These two are used internally -- you shouldn't need to use them */
 extern void verror_msg(const char *s, va_list p);
@@ -114,9 +114,9 @@
 char *getChunk(int size);
 char *chunkstrdup(const char *str);
 void freeChunks(void);
-ssize_t safe_read(int fd, void *buf, size_t count);
+ssize_t safe_read(FILE *f, void *buf, size_t count);
 ssize_t full_write(int fd, const char *buf, int len);
-ssize_t full_read(int fd, char *buf, int len);
+ssize_t full_read(FILE *f, char *buf, int len);
 int recursive_action(const char *fileName, int recurse, int followLinks, int depthFirst,
 	  int (*fileAction) (const char *fileName, struct stat* statbuf, void* userData),
 	  int (*dirAction) (const char *fileName, struct stat* statbuf, void* userData),
Index: libbb/unarchive.c
===================================================================
RCS file: /cvs/familiar/dist/ipkg/C/libbb/unarchive.c,v
retrieving revision 1.5
diff -u -r1.5 unarchive.c
--- C/libbb/unarchive.c	5 Feb 2005 21:58:19 -0000	1.5
+++ C/libbb/unarchive.c	21 Feb 2005 23:46:40 -0000
@@ -28,7 +28,7 @@
 #include "libbb.h"
 
 #define CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY 1
-// #define CONFIG_FEATURE_TAR_GNU_EXTENSIONS
+#define CONFIG_FEATURE_TAR_GNU_EXTENSIONS 1
 
 #ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS
 static char *longname = NULL;
@@ -84,7 +84,6 @@
 	char *full_link_name = NULL;
 	char *buffer = NULL;
 	struct utimbuf t;
-        int res;
 
 
 	/* prefix doesnt have to be a proper path it may prepend 
@@ -657,7 +656,7 @@
 # ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS
 	case 'L': {
 			longname = xmalloc(tar_entry->size + 1);
-			archive_xread_all((int) tar_stream, longname, tar_entry->size);
+			archive_xread_all(tar_stream, longname, tar_entry->size);
 			longname[tar_entry->size] = '\0';
 			archive_offset += tar_entry->size;
 
@@ -665,7 +664,7 @@
 		}
 	case 'K': {
 			linkname = xmalloc(tar_entry->size + 1);
-			archive_xread_all((int) tar_stream, longname, tar_entry->size);
+			archive_xread_all(tar_stream, longname, tar_entry->size);
 			linkname[tar_entry->size] = '\0';
 			archive_offset += tar_entry->size;
 
