fix oversized packets in udhcpc (closes: #962), bump busybox release number in whiter...
[oweals/openwrt.git] / package / busybox / patches / 912-ipkg-no_warnings.patch
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # remove (numerous) compile warnings
7 #
8 diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/file_util.c
9 --- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.c    2006-05-09 02:06:48.000000000 +0200
10 +++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/file_util.c        2006-05-09 02:16:48.000000000 +0200
11 @@ -123,7 +123,7 @@
12  
13  int file_mkdir_hier(const char *path, long mode)
14  {
15 -    return bb_make_directory(path, mode, FILEUTILS_RECUR);
16 +    return bb_make_directory((char *)path, mode, FILEUTILS_RECUR);
17  }
18  
19  char *file_md5sum_alloc(const char *file_name)
20 diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_cmd.c
21 --- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c     2006-05-09 02:23:37.000000000 +0200
22 +++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_cmd.c 2006-05-09 02:23:17.000000000 +0200
23 @@ -246,7 +246,7 @@
24                    in = fopen (tmp_file_name, "r");
25                    out = fopen (list_file_name, "w");
26                    if (in && out)
27 -                       inflate_unzip (in, out);
28 +                       inflate_unzip (fileno(in), fileno(out));
29                    else
30                         err = 1;
31                    if (in)
32 @@ -894,14 +894,13 @@
33          pkg_vec_free(available);
34       } else {
35           pkg_vec_t *installed_pkgs = pkg_vec_alloc();
36 -         int i;
37           int flagged_pkg_count = 0;
38           int removed;
39  
40           pkg_hash_fetch_all_installed(&conf->pkg_hash, installed_pkgs);
41  
42           for (i = 0; i < installed_pkgs->len; i++) {
43 -              pkg_t *pkg = installed_pkgs->pkgs[i];
44 +              pkg = installed_pkgs->pkgs[i];
45                if (pkg->state_flag & SF_USER) {
46                     flagged_pkg_count++;
47                } else {
48 @@ -921,7 +920,7 @@
49           do {
50                removed = 0;
51                for (i = 0; i < installed_pkgs->len; i++) {
52 -                   pkg_t *pkg = installed_pkgs->pkgs[i];
53 +                   pkg = installed_pkgs->pkgs[i];
54                     if (!(pkg->state_flag & SF_USER)
55                         && !pkg_has_installed_dependents(conf, pkg->parent, pkg, NULL)) {
56                          removed++;
57 @@ -976,7 +975,7 @@
58  {
59       int i;
60       pkg_t *pkg;
61 -     const char *flags = argv[0];
62 +     char *flags = argv[0];
63      
64       global_conf = conf;
65       signal(SIGINT, sigint_handler);
66 diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_conf.c
67 --- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.c    2006-05-09 02:12:04.000000000 +0200
68 +++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_conf.c        2006-05-09 02:16:48.000000000 +0200
69 @@ -542,14 +542,14 @@
70           if (strcmp(type, "option") == 0) {
71                ipkg_conf_set_option(options, name, value);
72           } else if (strcmp(type, "src") == 0) {
73 -              if (!nv_pair_list_find(pkg_src_list, name)) {
74 +              if (!nv_pair_list_find((nv_pair_list_t *)pkg_src_list, name)) {
75                     pkg_src_list_append (pkg_src_list, name, value, extra, 0);
76                } else {
77                     ipkg_message(conf, IPKG_ERROR, "ERROR: duplicate src declaration.  Skipping:\n\t src %s %s\n",
78                                  name, value);
79                }
80           } else if (strcmp(type, "src/gz") == 0) {
81 -              if (!nv_pair_list_find(pkg_src_list, name)) {
82 +              if (!nv_pair_list_find((nv_pair_list_t *)pkg_src_list, name)) {
83                     pkg_src_list_append (pkg_src_list, name, value, extra, 1);
84                } else {
85                     ipkg_message(conf, IPKG_ERROR, "ERROR: duplicate src declaration.  Skipping:\n\t src %s %s\n",
86 diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_download.c
87 --- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.c        2006-05-09 02:12:04.000000000 +0200
88 +++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/ipkg_download.c    2006-05-09 02:22:51.000000000 +0200
89 @@ -166,7 +166,7 @@
90           if (err)
91                return err;
92           pkg->local_filename = strdup(url);
93 -         ipkg_message(conf, IPKG_DEBUG2, "Package %s provided by hand \(%s\).\n", pkg->name,pkg->local_filename);
94 +         ipkg_message(conf, IPKG_DEBUG2, "Package %s provided by hand (%s).\n", pkg->name,pkg->local_filename);
95            pkg->provided_by_hand = 1;
96  
97       } else {
98 diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/libipkg.c
99 --- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.c      2006-05-09 02:12:05.000000000 +0200
100 +++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/libipkg.c  2006-05-09 02:16:48.000000000 +0200
101 @@ -445,7 +445,7 @@
102  int
103  ipkg_op (int argc, char *argv[])
104  {
105 -       int err, optind;
106 +       int err, opt_index;
107         args_t args;
108         char *cmd_name;
109         ipkg_cmd_t *cmd;
110 @@ -453,13 +453,13 @@
111  
112         args_init (&args);
113  
114 -       optind = args_parse (&args, argc, argv);
115 -       if (optind == argc || optind < 0)
116 +       opt_index = args_parse (&args, argc, argv);
117 +       if (opt_index == argc || opt_index < 0)
118         {
119                 args_usage ("ipkg must have one sub-command argument");
120         }
121  
122 -       cmd_name = argv[optind++];
123 +       cmd_name = argv[opt_index++];
124  /* Pigi: added a flag to disable the checking of structures if the command does not need to 
125           read anything from there.
126  */
127 @@ -509,7 +509,7 @@
128                 args_usage (NULL);
129         }
130  
131 -       if (cmd->requires_args && optind == argc)
132 +       if (cmd->requires_args && opt_index == argc)
133         {
134                 fprintf (stderr,
135                          "%s: the ``%s'' command requires at least one argument\n",
136 @@ -517,7 +517,7 @@
137                 args_usage (NULL);
138         }
139  
140 -       err = ipkg_cmd_exec (cmd, &ipkg_conf, argc - optind, (const char **) (argv + optind), NULL);
141 +       err = ipkg_cmd_exec (cmd, &ipkg_conf, argc - opt_index, (const char **) (argv + opt_index), NULL);
142  
143         ipkg_conf_deinit (&ipkg_conf);
144  
145 diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/md5.c
146 --- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.c  2006-05-09 02:06:48.000000000 +0200
147 +++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/md5.c      2006-05-09 02:16:48.000000000 +0200
148 @@ -25,7 +25,6 @@
149  int md5_stream(FILE *stream, void *resblock)
150  {
151         int fd;
152 -       int sum;
153         
154         if( (fd = fileno(stream)) == -1 ) {
155                 bb_error_msg("bad file descriptor");
156 diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.c
157 --- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.c  2006-05-09 02:12:05.000000000 +0200
158 +++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.c      2006-05-09 02:16:48.000000000 +0200
159 @@ -528,6 +528,7 @@
160  char * pkg_formatted_field(pkg_t *pkg, const char *field )
161  {
162       static size_t LINE_LEN = 128;
163 +     char line_str[LINE_LEN];
164       char * temp = (char *)malloc(1);
165       int len = 0;
166       int flag_provide_false = 0;
167 @@ -567,7 +568,6 @@
168           if (strcasecmp(field, "Conffiles") == 0) {
169                /* Conffiles */
170                conffile_list_elt_t *iter;
171 -               char confstr[LINE_LEN];
172  
173                if (pkg->conffiles.head == NULL) {
174                     return temp;
175 @@ -588,15 +588,14 @@
176                 strncpy(temp, "Conffiles:\n", 12);
177                for (iter = pkg->conffiles.head; iter; iter = iter->next) {
178                     if (iter->data->name && iter->data->value) {
179 -                         snprintf(confstr, LINE_LEN, "%s %s\n", iter->data->name, iter->data->value);
180 -                         strncat(temp, confstr, strlen(confstr));           
181 +                         snprintf(line_str, LINE_LEN, "%s %s\n", iter->data->name, iter->data->value);
182 +                         strncat(temp, line_str, strlen(line_str));           
183                     }
184                }
185           } else if (strcasecmp(field, "Conflicts") == 0) {
186                int i;
187  
188                if (pkg->conflicts_count) {
189 -                    char conflictstr[LINE_LEN];
190                      len = 14 ;
191                     for(i = 0; i < pkg->conflicts_count; i++) {
192                          len = len + (strlen(pkg->conflicts_str[i])+5);
193 @@ -609,8 +608,8 @@
194                      temp[0]='\0';
195                      strncpy(temp, "Conflicts:", 11);
196                     for(i = 0; i < pkg->conflicts_count; i++) {
197 -                        snprintf(conflictstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->conflicts_str[i]);
198 -                        strncat(temp, conflictstr, strlen(conflictstr));           
199 +                        snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->conflicts_str[i]);
200 +                        strncat(temp, line_str, strlen(line_str));           
201                      }
202                      strncat(temp, "\n", strlen("\n")); 
203                }
204 @@ -625,7 +624,6 @@
205                int i;
206  
207                if (pkg->depends_count) {
208 -                    char depstr[LINE_LEN];
209                      len = 14 ;
210                     for(i = 0; i < pkg->depends_count; i++) {
211                          len = len + (strlen(pkg->depends_str[i])+4);
212 @@ -638,8 +636,8 @@
213                      temp[0]='\0';
214                      strncpy(temp, "Depends:", 10);
215                     for(i = 0; i < pkg->depends_count; i++) {
216 -                        snprintf(depstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->depends_str[i]);
217 -                        strncat(temp, depstr, strlen(depstr));           
218 +                        snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->depends_str[i]);
219 +                        strncat(temp, line_str, strlen(line_str));           
220                      }
221                      strncat(temp, "\n", strlen("\n")); 
222                }
223 @@ -804,7 +802,6 @@
224           /* Replaces | Recommends*/
225           if (strcasecmp (field, "Replaces") == 0) {
226                if (pkg->replaces_count) {
227 -                    char replstr[LINE_LEN];
228                      len = 14;
229                     for (i = 0; i < pkg->replaces_count; i++) {
230                          len = len + (strlen(pkg->replaces_str[i])+5);
231 @@ -817,14 +814,13 @@
232                      temp[0]='\0';
233                      strncpy(temp, "Replaces:", 12);
234                     for (i = 0; i < pkg->replaces_count; i++) {
235 -                        snprintf(replstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->replaces_str[i]);
236 -                        strncat(temp, replstr, strlen(replstr));           
237 +                        snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->replaces_str[i]);
238 +                        strncat(temp, line_str, strlen(line_str));           
239                      }
240                      strncat(temp, "\n", strlen("\n")); 
241                }
242           } else if (strcasecmp (field, "Recommends") == 0) {
243                if (pkg->recommends_count) {
244 -                    char recstr[LINE_LEN];
245                      len = 15;
246                     for(i = 0; i < pkg->recommends_count; i++) {
247                           len = len + (strlen( pkg->recommends_str[i])+5);
248 @@ -837,8 +833,8 @@
249                      temp[0]='\0';
250                      strncpy(temp, "Recommends:", 13);
251                     for(i = 0; i < pkg->recommends_count; i++) {
252 -                        snprintf(recstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->recommends_str[i]);
253 -                        strncat(temp, recstr, strlen(recstr));           
254 +                        snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->recommends_str[i]);
255 +                        strncat(temp, line_str, strlen(line_str));           
256                      }
257                      strncat(temp, "\n", strlen("\n")); 
258                }
259 @@ -907,7 +903,6 @@
260           } else if (strcasecmp(field, "Suggests") == 0) {
261                if (pkg->suggests_count) {
262                     int i;
263 -                    char sugstr[LINE_LEN];
264                      len = 13;
265                     for(i = 0; i < pkg->suggests_count; i++) {
266                          len = len + (strlen(pkg->suggests_str[i])+5);
267 @@ -920,8 +915,8 @@
268                      temp[0]='\0';
269                      strncpy(temp, "Suggests:", 10);
270                     for(i = 0; i < pkg->suggests_count; i++) {
271 -                        snprintf(sugstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->suggests_str[i]);
272 -                        strncat(temp, sugstr, strlen(sugstr));           
273 +                        snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->suggests_str[i]);
274 +                        strncat(temp, line_str, strlen(line_str));           
275                      }
276                      strncat(temp, "\n", strlen("\n")); 
277                }
278 @@ -1140,10 +1135,8 @@
279       return 0;
280  }
281  
282 -int pkg_name_version_and_architecture_compare(void *p1, void *p2)
283 +int pkg_name_version_and_architecture_compare(pkg_t *a, pkg_t *b)
284  {
285 -     const pkg_t *a = *(const pkg_t **)p1;
286 -     const pkg_t *b = *(const pkg_t **)p2;
287       int namecmp;
288       int vercmp;
289       if (!a->name || !b->name) {
290 @@ -1170,10 +1163,8 @@
291       return 0;
292  }
293  
294 -int abstract_pkg_name_compare(void *p1, void *p2)
295 +int abstract_pkg_name_compare(abstract_pkg_t *a, abstract_pkg_t *b)
296  {
297 -     const abstract_pkg_t *a = *(const abstract_pkg_t **)p1;
298 -     const abstract_pkg_t *b = *(const abstract_pkg_t **)p2;
299       if (!a->name || !b->name) {
300         fprintf(stderr, "abstract_pkg_name_compare: a=%p a->name=%p b=%p b->name=%p\n",
301                a, a->name, b, b->name);
302 @@ -1193,7 +1184,7 @@
303  #endif
304  
305       if (pkg->epoch) {
306 -         sprintf_alloc(&epoch_str, "%d:", pkg->epoch);
307 +         sprintf_alloc(&epoch_str, "%d:", (int)(pkg->epoch));
308       } else {
309           epoch_str = strdup("");
310       }
311 diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.h busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.h
312 --- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.h  2006-05-09 02:12:05.000000000 +0200
313 +++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg.h      2006-05-09 02:16:48.000000000 +0200
314 @@ -194,8 +194,8 @@
315  char *pkg_version_str_alloc(pkg_t *pkg);
316  
317  int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg);
318 -int pkg_name_version_and_architecture_compare(void *a, void *b);
319 -int abstract_pkg_name_compare(void *a, void *b);
320 +int pkg_name_version_and_architecture_compare(pkg_t *a, pkg_t *b);
321 +int abstract_pkg_name_compare(abstract_pkg_t *a, abstract_pkg_t *b);
322  
323  char * pkg_formatted_info(pkg_t *pkg );
324  char * pkg_formatted_field(pkg_t *pkg, const char *field );
325 diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_depends.c
326 --- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.c  2006-05-09 02:12:05.000000000 +0200
327 +++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_depends.c      2006-05-09 02:16:48.000000000 +0200
328 @@ -68,7 +68,7 @@
329                                             pkg_vec_t *unsatisfied, char *** unresolved)
330  {
331       pkg_t * satisfier_entry_pkg;
332 -     register int i, j, k;
333 +     register int i, j, k, l;
334       int count, found;
335       char ** the_lost;
336       abstract_pkg_t * ab_pkg;
337 @@ -113,7 +113,6 @@
338                     abstract_pkg_vec_t *ab_provider_vec = abpkg->provided_by;
339                     int nposs = ab_provider_vec->len;
340                     abstract_pkg_t **ab_providers = ab_provider_vec->pkgs; 
341 -                   int l;
342                     for (l = 0; l < nposs; l++) {
343                          pkg_vec_t *test_vec = ab_providers[l]->pkgs;
344                          /* if no depends on this one, try the first package that Provides this one */
345 @@ -137,10 +136,9 @@
346                                                                                 tmp_vec,
347                                                                                 &newstuff);
348                                    if (newstuff == NULL) {
349 -                                       int i;
350                                         int ok = 1;
351 -                                       for (i = 0; i < rc; i++) {
352 -                                           pkg_t *p = tmp_vec->pkgs[i];
353 +                                       for (l = 0; l < rc; l++) {
354 +                                           pkg_t *p = tmp_vec->pkgs[l];
355                                             if (p->state_want == SW_INSTALL)
356                                                 continue;
357                                             ipkg_message(conf, IPKG_DEBUG, "not installing %s due to requirement for %s\n", pkg_scout->name, p->name);
358 @@ -814,27 +812,27 @@
359   *   [npredepends+nrecommends,npredepends+nrecommends+nsuggests) -> returns recommends_str[index]
360   *   [npredepends+nrecommends+nsuggests,npredepends+nrecommends+nsuggests+ndepends) -> returns depends_str[index]
361   */
362 -char *pkg_depend_str(pkg_t *pkg, int index)
363 +char *pkg_depend_str(pkg_t *pkg, int pkg_index)
364  {
365 -     if (index < pkg->pre_depends_count) {
366 -         return pkg->pre_depends_str[index];
367 +     if (pkg_index < pkg->pre_depends_count) {
368 +         return pkg->pre_depends_str[pkg_index];
369       }
370 -     index -= pkg->pre_depends_count;
371 +     pkg_index -= pkg->pre_depends_count;
372  
373 -     if (index < pkg->recommends_count) {
374 -         return pkg->recommends_str[index];
375 +     if (pkg_index < pkg->recommends_count) {
376 +         return pkg->recommends_str[pkg_index];
377       }
378 -     index -= pkg->recommends_count;
379 +     pkg_index -= pkg->recommends_count;
380  
381 -     if (index < pkg->suggests_count) {
382 -         return pkg->suggests_str[index];
383 +     if (pkg_index < pkg->suggests_count) {
384 +         return pkg->suggests_str[pkg_index];
385       }
386 -     index -= pkg->suggests_count;
387 +     pkg_index -= pkg->suggests_count;
388  
389 -     if (index < pkg->depends_count) {
390 -         return pkg->depends_str[index];
391 +     if (pkg_index < pkg->depends_count) {
392 +         return pkg->depends_str[pkg_index];
393       }
394 -     fprintf(stderr, "pkg_depend_str: index %d out of range for pkg=%s\n", index, pkg->name);
395 +     fprintf(stderr, "pkg_depend_str: index %d out of range for pkg=%s\n", pkg_index, pkg->name);
396       return NULL;
397  }
398  
399 diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.h busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_depends.h
400 --- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.h  2006-05-09 02:06:48.000000000 +0200
401 +++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_depends.h      2006-05-09 02:16:48.000000000 +0200
402 @@ -92,7 +92,7 @@
403   */
404  int pkg_conflicts(pkg_t *pkg, pkg_t *conflicts);
405  
406 -char *pkg_depend_str(pkg_t *pkg, int index);
407 +char *pkg_depend_str(pkg_t *pkg, int pkg_index);
408  void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg);
409  void freeDepends(pkg_t *pkg);
410  void printDepends(pkg_t * pkg);
411 diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.c busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_hash.c
412 --- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.c     2006-05-09 02:12:05.000000000 +0200
413 +++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_hash.c 2006-05-09 02:17:35.000000000 +0200
414 @@ -143,7 +143,7 @@
415  pkg_t *pkg_hash_fetch_best_installation_candidate(ipkg_conf_t *conf, abstract_pkg_t *apkg, 
416                                                   int (*constraint_fcn)(pkg_t *pkg, void *cdata), void *cdata, int quiet)
417  {
418 -     int i; 
419 +     int i, j;
420       int nprovides = 0;
421       int nmatching = 0;
422       pkg_vec_t *matching_pkgs = pkg_vec_alloc();
423 @@ -209,11 +209,10 @@
424           /* now check for supported architecture */
425           {
426                int max_count = 0;
427 -              int i;
428  
429                /* count packages matching max arch priority and keep track of last one */
430 -              for (i = 0; i < vec->len; i++) {
431 -                   pkg_t *maybe = vec->pkgs[i];
432 +              for (j = 0; j < vec->len; j++) {
433 +                   pkg_t *maybe = vec->pkgs[j];
434                     ipkg_message(conf, IPKG_DEBUG, "  %s arch=%s arch_priority=%d version=%s  \n",
435                                  maybe->name, maybe->architecture, maybe->arch_priority, maybe->version);
436                     if (maybe->arch_priority > 0)  {
437 diff -ruN busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.h busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_vec.h
438 --- busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.h      2006-05-09 02:06:48.000000000 +0200
439 +++ busybox-1.1.2+ipkg-0.99.162-no_warnings/archival/libipkg/pkg_vec.h  2006-05-09 02:16:48.000000000 +0200
440 @@ -35,6 +35,8 @@
441  };
442  typedef struct abstract_pkg_vec abstract_pkg_vec_t;
443  
444 +typedef int (*pkg_compar_t)(pkg_t *, pkg_t *);
445 +typedef int (*abstract_pkg_compar_t)(abstract_pkg_t *, abstract_pkg_t *);
446  
447  pkg_vec_t * pkg_vec_alloc(void);
448  void pkg_vec_free(pkg_vec_t *vec);