aports/main/squark/gcc-10.patch
2020-11-11 16:08:29 -03:00

29 lines
887 B
Diff

Upstream: Should be
Reason: Fixes compilation with -fno-common
diff --git a/src/filterdb.c b/src/filterdb.c
index 5ee85ac..b69497d 100644
--- a/src/filterdb.c
+++ b/src/filterdb.c
@@ -12,7 +12,7 @@
#define PAGE_SIZE 4096
#define ALIGN(s,a) (((s) + a - 1) & ~(a - 1))
-const char *sqdb_section_names[SQDB_SECTION_MAX] = {
+extern const char *sqdb_section_names[SQDB_SECTION_MAX] = {
[SQDB_SECTION_STRINGS] = "strings",
[SQDB_SECTION_CATEGORIES] = "categories",
[SQDB_SECTION_INDEX] = "index",
diff --git a/src/filterdb.h b/src/filterdb.h
index 2d16572..cbd55af 100644
--- a/src/filterdb.h
+++ b/src/filterdb.h
@@ -46,7 +46,7 @@ struct sqdb_index_entry {
};
-const char *sqdb_section_names[SQDB_SECTION_MAX];
+extern const char *sqdb_section_names[SQDB_SECTION_MAX];
int sqdb_create(struct sqdb *db, const char *fn);
int sqdb_open(struct sqdb *db, const char *fn);