gcc10.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. Fix building with GCC 10
  2. Origin: https://sources.debian.org/patches/jfsutils/1.1.15-5/gcc10_fix-1.patch/
  3. --- a/fscklog/display.c
  4. +++ b/fscklog/display.c
  5. @@ -54,7 +54,7 @@
  6. * output: fsck extracted service log I/O buffer
  7. *
  8. */
  9. -char xchklog_buffer[XCHKLOG_BUFSIZE];
  10. +static char xchklog_buffer[XCHKLOG_BUFSIZE];
  11. /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  12. *
  13. --- a/libfs/logredo.c
  14. +++ b/libfs/logredo.c
  15. @@ -87,9 +87,9 @@
  16. * S T U F F F O R T H E L O G
  17. *
  18. */
  19. -struct logsuper logsup; /* log super block */
  20. -int32_t numdoblk; /* number of do blocks used */
  21. -int32_t numnodofile; /* number of nodo file blocks used */
  22. +static struct logsuper logsup; /* log super block */
  23. +static int32_t numdoblk; /* number of do blocks used */
  24. +static int32_t numnodofile; /* number of nodo file blocks used */
  25. int32_t numExtDtPg = 0; /* number of extended dtpage blocks used */
  26. /*
  27. @@ -129,7 +129,7 @@
  28. */
  29. /* buffer header table */
  30. -struct bufhdr {
  31. +static struct bufhdr {
  32. int16_t next; /* 2: next on free/lru list */
  33. int16_t prev; /* 2: previous on free/lru list */
  34. int16_t hnext; /* 2: next on hash chain */
  35. @@ -142,7 +142,7 @@
  36. } bufhdr[NBUFPOOL]; /* (24) */
  37. /* buffer table */
  38. -struct bufpool {
  39. +static struct bufpool {
  40. char bytes[PSIZE];
  41. } buffer[NBUFPOOL - 1];
  42. @@ -151,15 +151,16 @@
  43. *
  44. * log has its own 4 page buffer pool.
  45. */
  46. -uint8_t afterdata[LOGPSIZE * 2]; /* buffer to read in redopage data */
  47. +static uint8_t afterdata[LOGPSIZE * 2]; /* buffer to read in redopage data */
  48. /*
  49. * Miscellaneous
  50. */
  51. -caddr_t prog; /* Program name */
  52. -int32_t mntcnt, bufsize;
  53. -char *mntinfo;
  54. -int32_t retcode; /* return code from logredo */
  55. +static caddr_t prog; /* Program name */
  56. +extern int32_t mntcnt;
  57. +static int32_t bufsize;
  58. +static char *mntinfo;
  59. +static int32_t retcode; /* return code from logredo */
  60. int end_of_transaction = 0;
  61. /*