patch-src_examples_convtab_dump_c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. $OpenBSD: patch-src_examples_convtab_dump_c,v 1.1.1.1 2015/06/15 07:15:29 ajacoutot Exp $
  2. convtab_dump.c:32: error: 'index' redeclared as different kind of symbol
  3. --- src/examples/convtab_dump.c.orig Mon Jun 15 00:37:26 2015
  4. +++ src/examples/convtab_dump.c Mon Jun 15 00:38:16 2015
  5. @@ -29,7 +29,7 @@
  6. // raw table
  7. #define MAX_TAB_SIZE 64*1024*1024
  8. uint8_t tab[MAX_TAB_SIZE];
  9. -uint32_t index[0xffff];
  10. +uint32_t bindex[0xffff];
  11. static size_t _read_tab(const char *file)
  12. {
  13. @@ -99,7 +99,7 @@ int main(int argc, char **argv)
  14. // read index table
  15. for (entry = 0; entry < numEntries; entry++) {
  16. - index[entry] = FETCH4(&tab[offset]);
  17. + bindex[entry] = FETCH4(&tab[offset]);
  18. offset += 4;
  19. }
  20. @@ -125,12 +125,12 @@ int main(int argc, char **argv)
  21. memcpy(patch1, &tab[ offset ], sizeof(patch1));
  22. offset += 5;
  23. - uint64_t off0 = (( (uint64_t)index[entry] +
  24. + uint64_t off0 = (( (uint64_t)bindex[entry] +
  25. (uint64_t)patch0_address_adjust) *
  26. (uint64_t)0xC0 +
  27. (uint64_t)patch0_buffer_offset);
  28. - uint64_t off1 = (( (uint64_t)index[entry] +
  29. + uint64_t off1 = (( (uint64_t)bindex[entry] +
  30. (uint64_t)patch0_address_adjust +
  31. (uint64_t)patch1_address_adjust) *
  32. (uint64_t)0xC0 +