don't fail if BR2_USE_UPDATES tries to update non-checkout
[buildroot.git] / package / busybox / busybox-1.4.0-tar.patch
blob90318ea64eab26aaa2586ae2260685a037e3d94c
1 --- busybox-1.4.0/archival/tar.c Fri Jan 19 22:23:02 2007
2 +++ busybox-1.4.0-tar/archival/tar.c Wed Jan 24 21:32:00 2007
3 @@ -23,10 +23,10 @@
4 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
5 */
7 -#include "busybox.h"
8 -#include "unarchive.h"
9 #include <fnmatch.h>
10 #include <getopt.h>
11 +#include "busybox.h"
12 +#include "unarchive.h"
14 #if ENABLE_FEATURE_TAR_CREATE
16 @@ -37,6 +37,7 @@
17 /* POSIX tar Header Block, from POSIX 1003.1-1990 */
18 #define NAME_SIZE 100
19 #define NAME_SIZE_STR "100"
20 +typedef struct TarHeader TarHeader;
21 struct TarHeader { /* byte offset */
22 char name[NAME_SIZE]; /* 0-99 */
23 char mode[8]; /* 100-107 */
24 @@ -56,7 +57,6 @@
25 char prefix[155]; /* 345-499 */
26 char padding[12]; /* 500-512 (pad to exactly the TAR_BLOCK_SIZE) */
28 -typedef struct TarHeader TarHeader;
31 ** writeTarFile(), writeFileToTarball(), and writeTarHeader() are
32 @@ -73,6 +73,7 @@
35 /* Some info to be carried along when creating a new tarball */
36 +typedef struct TarBallInfo TarBallInfo;
37 struct TarBallInfo {
38 int tarFd; /* Open-for-write file descriptor
39 for the tarball */
40 @@ -85,7 +86,6 @@
41 HardLinkInfo *hlInfoHead; /* Hard Link Tracking Information */
42 HardLinkInfo *hlInfo; /* Hard Link Info for the current file */
44 -typedef struct TarBallInfo TarBallInfo;
46 /* A nice enum with all the possible tar file content types */
47 enum TarFileType {
48 @@ -348,7 +348,7 @@
49 return TRUE;
52 -# if ENABLE_FEATURE_TAR_FROM
53 +#if ENABLE_FEATURE_TAR_FROM
54 static int exclude_file(const llist_t *excluded_files, const char *file)
56 while (excluded_files) {
57 @@ -371,12 +371,12 @@
59 return 0;
61 -# else
62 +#else
63 #define exclude_file(excluded_files, file) 0
64 -# endif
65 +#endif
67 static int writeFileToTarball(const char *fileName, struct stat *statbuf,
68 - void *userData, int depth)
69 + void *userData, int depth ATTRIBUTE_UNUSED)
71 struct TarBallInfo *tbInfo = (struct TarBallInfo *) userData;
72 const char *header_name;
73 @@ -509,14 +509,14 @@
74 if (pipe(gzipDataPipe) < 0 || pipe(gzipStatusPipe) < 0)
75 bb_perror_msg_and_die("pipe");
77 - signal(SIGPIPE, SIG_IGN); /* we only want EPIPE on errors */
78 + signal(SIGPIPE, SIG_IGN); /* we only want EPIPE on errors */
80 -# if __GNUC__
81 +#if defined(__GNUC__) && __GNUC__
82 /* Avoid vfork clobbering */
83 (void) &include;
84 (void) &errorFlag;
85 (void) &zip_exec;
86 -# endif
87 +#endif
89 gzipPid = vfork();
91 @@ -600,7 +600,7 @@
92 int writeTarFile(const int tar_fd, const int verboseFlag,
93 const unsigned long dereferenceFlag, const llist_t *include,
94 const llist_t *exclude, const int gzip);
95 -#endif /* tar_create */
96 +#endif /* FEATURE_TAR_CREATE */
98 #if ENABLE_FEATURE_TAR_FROM
99 static llist_t *append_file_list_to_list(llist_t *list)
100 @@ -628,7 +628,7 @@
101 return newlist;
103 #else
104 -#define append_file_list_to_list(x) 0
105 +#define append_file_list_to_list(x) 0
106 #endif
108 #if ENABLE_FEATURE_TAR_COMPRESS
109 @@ -653,7 +653,7 @@
110 return EXIT_FAILURE;
112 #else
113 -#define get_header_tar_Z 0
114 +#define get_header_tar_Z NULL
115 #endif
117 #ifdef CHECK_FOR_CHILD_EXITCODE