|
| 1 | +From 73932702edef3f206d4ad9671971e6e93fe37a03 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Szymon Janc < [email protected]> |
| 3 | +Date: Mon, 18 May 2020 14:36:04 +0200 |
| 4 | +Subject: [PATCH] Fix complilation with GCC 10 |
| 5 | + |
| 6 | +GCC 10 enables -fno-common by default. |
| 7 | +--- |
| 8 | + encoding/json/hosttest/src/test_json_priv.h | 12 ++++++------ |
| 9 | + encoding/json/selftest/src/test_json_priv.h | 12 ++++++------ |
| 10 | + fs/fs/src/fs_mount.c | 2 +- |
| 11 | + fs/nffs/selftest/src/nffs_test_utils.h | 3 --- |
| 12 | + fs/nffs/src/nffs_dir.c | 2 +- |
| 13 | + fs/nffs/src/nffs_file.c | 2 +- |
| 14 | + 6 files changed, 15 insertions(+), 18 deletions(-) |
| 15 | + |
| 16 | +diff --git a/encoding/json/hosttest/src/test_json_priv.h b/encoding/json/hosttest/src/test_json_priv.h |
| 17 | +index a32c4fbe2..69ace9353 100644 |
| 18 | +--- a/encoding/json/hosttest/src/test_json_priv.h |
| 19 | ++++ b/encoding/json/hosttest/src/test_json_priv.h |
| 20 | +@@ -28,14 +28,14 @@ |
| 21 | + extern "C" { |
| 22 | + #endif |
| 23 | + |
| 24 | +-char *output; |
| 25 | +-char *output1; |
| 26 | +-char *outputboolspace; |
| 27 | +-char *outputboolempty; |
| 28 | ++extern char *output; |
| 29 | ++extern char *output1; |
| 30 | ++extern char *outputboolspace; |
| 31 | ++extern char *outputboolempty; |
| 32 | + |
| 33 | + #define JSON_BIGBUF_SIZE 192 |
| 34 | +-char *bigbuf; |
| 35 | +-int buf_index; |
| 36 | ++extern char *bigbuf; |
| 37 | ++extern int buf_index; |
| 38 | + |
| 39 | + /* a test structure to hold the json flat buffer and pass bytes |
| 40 | + * to the decoder */ |
| 41 | +diff --git a/encoding/json/selftest/src/test_json_priv.h b/encoding/json/selftest/src/test_json_priv.h |
| 42 | +index a32c4fbe2..69ace9353 100644 |
| 43 | +--- a/encoding/json/selftest/src/test_json_priv.h |
| 44 | ++++ b/encoding/json/selftest/src/test_json_priv.h |
| 45 | +@@ -28,14 +28,14 @@ |
| 46 | + extern "C" { |
| 47 | + #endif |
| 48 | + |
| 49 | +-char *output; |
| 50 | +-char *output1; |
| 51 | +-char *outputboolspace; |
| 52 | +-char *outputboolempty; |
| 53 | ++extern char *output; |
| 54 | ++extern char *output1; |
| 55 | ++extern char *outputboolspace; |
| 56 | ++extern char *outputboolempty; |
| 57 | + |
| 58 | + #define JSON_BIGBUF_SIZE 192 |
| 59 | +-char *bigbuf; |
| 60 | +-int buf_index; |
| 61 | ++extern char *bigbuf; |
| 62 | ++extern int buf_index; |
| 63 | + |
| 64 | + /* a test structure to hold the json flat buffer and pass bytes |
| 65 | + * to the decoder */ |
| 66 | +diff --git a/fs/fs/src/fs_mount.c b/fs/fs/src/fs_mount.c |
| 67 | +index f43738aa8..5319aed7b 100644 |
| 68 | +--- a/fs/fs/src/fs_mount.c |
| 69 | ++++ b/fs/fs/src/fs_mount.c |
| 70 | +@@ -96,7 +96,7 @@ fs_ops_for(const char *fs_name) |
| 71 | + return fops; |
| 72 | + } |
| 73 | + |
| 74 | +-struct fs_ops not_initialized_ops; |
| 75 | ++extern struct fs_ops not_initialized_ops; |
| 76 | + |
| 77 | + struct fs_ops * |
| 78 | + fs_ops_from_container(struct fops_container *container) |
| 79 | +diff --git a/fs/nffs/selftest/src/nffs_test_utils.h b/fs/nffs/selftest/src/nffs_test_utils.h |
| 80 | +index 0dd21472c..ad22cb956 100644 |
| 81 | +--- a/fs/nffs/selftest/src/nffs_test_utils.h |
| 82 | ++++ b/fs/nffs/selftest/src/nffs_test_utils.h |
| 83 | +@@ -36,9 +36,6 @@ |
| 84 | + extern "C" { |
| 85 | + #endif |
| 86 | + |
| 87 | +-extern struct nffs_hash_entry *nffs_test_touched_entries; |
| 88 | +-int nffs_test_num_touched_entries; |
| 89 | +- |
| 90 | + extern int flash_native_memset(uint32_t offset, uint8_t c, uint32_t len); |
| 91 | + |
| 92 | + void nffs_test_util_assert_ent_name(struct fs_dirent *dirent, |
| 93 | +diff --git a/fs/nffs/src/nffs_dir.c b/fs/nffs/src/nffs_dir.c |
| 94 | +index 8cdefa9f7..a30636aed 100644 |
| 95 | +--- a/fs/nffs/src/nffs_dir.c |
| 96 | ++++ b/fs/nffs/src/nffs_dir.c |
| 97 | +@@ -23,7 +23,7 @@ |
| 98 | + #include "nffs/nffs.h" |
| 99 | + #include "fs/fs_if.h" |
| 100 | + |
| 101 | +-struct fs_ops nffs_ops; |
| 102 | ++extern struct fs_ops nffs_ops; |
| 103 | + |
| 104 | + static struct nffs_dir * |
| 105 | + nffs_dir_alloc(void) |
| 106 | +diff --git a/fs/nffs/src/nffs_file.c b/fs/nffs/src/nffs_file.c |
| 107 | +index bf1866f12..c7bcb0290 100644 |
| 108 | +--- a/fs/nffs/src/nffs_file.c |
| 109 | ++++ b/fs/nffs/src/nffs_file.c |
| 110 | +@@ -23,7 +23,7 @@ |
| 111 | + #include "nffs/nffs.h" |
| 112 | + #include "fs/fs_if.h" |
| 113 | + |
| 114 | +-struct fs_ops nffs_ops; |
| 115 | ++extern struct fs_ops nffs_ops; |
| 116 | + |
| 117 | + static struct nffs_file * |
| 118 | + nffs_file_alloc(void) |
| 119 | +-- |
| 120 | +2.26.2 |
| 121 | + |
0 commit comments