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