0002-stdint-cleanup.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. consolidate use of stdint types
  2. Change u_int*_t to uint*_t for compatibility with a larger number of C
  3. libraries.
  4. Signed-off-by: Doug Kehn <rdkehn@yahoo.com>
  5. Index: sp-oops-extract-0.0.7-1/src/oopslog.c
  6. ===================================================================
  7. --- sp-oops-extract-0.0.7-1.orig/src/oopslog.c
  8. +++ sp-oops-extract-0.0.7-1/src/oopslog.c
  9. @@ -64,8 +64,8 @@ static int try_to_check_for_bad_blocks(v
  10. int main(const int argc, const char *argv[])
  11. {
  12. - u_int32_t *count, maxcount = 0xffffffff;
  13. - u_int32_t *magic_ptr, magic_value = 0x5d005d00;
  14. + uint32_t *count, maxcount = 0xffffffff;
  15. + uint32_t *magic_ptr, magic_value = 0x5d005d00;
  16. unsigned char *charbuf;
  17. unsigned long size;
  18. @@ -137,8 +137,8 @@ int main(const int argc, const char *arg
  19. errx(-1, "%s is something weird", device);
  20. charbuf = buf;
  21. - count = (u_int32_t *) buf;
  22. - magic_ptr = (u_int32_t *) (buf + sizeof(u_int32_t));
  23. + count = (uint32_t *) buf;
  24. + magic_ptr = (uint32_t *) (buf + sizeof(uint32_t));
  25. for (i = 0; i < (size / OOPS_PAGE_SIZE); i++) {
  26. pread(fd, buf, OOPS_PAGE_SIZE, i * OOPS_PAGE_SIZE);