summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch')
-rw-r--r--meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch111
1 files changed, 111 insertions, 0 deletions
diff --git a/meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch b/meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch
new file mode 100644
index 0000000000..aeae864cd4
--- /dev/null
+++ b/meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch
@@ -0,0 +1,111 @@
1From 1ce739649b4d66339a03fc0ec9ee7a2f7c141780 Mon Sep 17 00:00:00 2001
2From: Mamoru TASAKA <mtasaka@fedoraproject.org>
3Date: Fri, 24 Jan 2020 13:33:00 +0900
4Subject: Support gcc10 compilation
5
6gcc10 now defaults to -fno-common, and with gcc10 menu-cache compilation fails like
7
8/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:167: multiple definition of `DirDirs'; main.o:menu-cache-gen/menu-tags.h:167: first defined here
9/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:164: multiple definition of `AppDirs'; main.o:menu-cache-gen/menu-tags.h:164: first defined here
10/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:52: multiple definition of `menuTag_Layout'; main.o:menu-cache-gen/menu-tags.h:52: first defined here
11....
12
13This patch fixes compilation with gcc10: properly declaring variables in header with "extern", and also removing some unneeded variables in header files.
14
15Upstream-Status: Submitted [https://github.com/lxde/menu-cache/pull/19]
16Signed-off-by: Adrian Bunk <bunk@stusta.de>
17---
18 menu-cache-gen/menu-tags.h | 55 ++++++++++++--------------------------
19 1 file changed, 17 insertions(+), 38 deletions(-)
20
21diff --git a/menu-cache-gen/menu-tags.h b/menu-cache-gen/menu-tags.h
22index f3fd7d3..f71c0bc 100644
23--- a/menu-cache-gen/menu-tags.h
24+++ b/menu-cache-gen/menu-tags.h
25@@ -22,38 +22,17 @@
26 #include <libfm/fm-extra.h>
27 #include <menu-cache.h>
28
29-FmXmlFileTag menuTag_Menu;
30-FmXmlFileTag menuTag_AppDir;
31-FmXmlFileTag menuTag_DefaultAppDirs;
32-FmXmlFileTag menuTag_DirectoryDir;
33-FmXmlFileTag menuTag_DefaultDirectoryDirs;
34-FmXmlFileTag menuTag_Include;
35-FmXmlFileTag menuTag_Exclude;
36-FmXmlFileTag menuTag_Filename;
37-FmXmlFileTag menuTag_Or;
38-FmXmlFileTag menuTag_And;
39-FmXmlFileTag menuTag_Not;
40-FmXmlFileTag menuTag_Category;
41-FmXmlFileTag menuTag_MergeFile;
42-FmXmlFileTag menuTag_MergeDir;
43-FmXmlFileTag menuTag_DefaultMergeDirs;
44-FmXmlFileTag menuTag_Directory;
45-FmXmlFileTag menuTag_Name;
46-FmXmlFileTag menuTag_Deleted;
47-FmXmlFileTag menuTag_NotDeleted;
48-FmXmlFileTag menuTag_OnlyUnallocated;
49-FmXmlFileTag menuTag_NotOnlyUnallocated;
50-FmXmlFileTag menuTag_All;
51-FmXmlFileTag menuTag_LegacyDir;
52-FmXmlFileTag menuTag_KDELegacyDirs;
53-FmXmlFileTag menuTag_Move;
54-FmXmlFileTag menuTag_Old;
55-FmXmlFileTag menuTag_New;
56-FmXmlFileTag menuTag_Layout;
57-FmXmlFileTag menuTag_DefaultLayout;
58-FmXmlFileTag menuTag_Menuname;
59-FmXmlFileTag menuTag_Separator;
60-FmXmlFileTag menuTag_Merge;
61+extern FmXmlFileTag menuTag_AppDir;
62+extern FmXmlFileTag menuTag_DirectoryDir;
63+extern FmXmlFileTag menuTag_Include;
64+extern FmXmlFileTag menuTag_Exclude;
65+extern FmXmlFileTag menuTag_Filename;
66+extern FmXmlFileTag menuTag_Or;
67+extern FmXmlFileTag menuTag_And;
68+extern FmXmlFileTag menuTag_Not;
69+extern FmXmlFileTag menuTag_Category;
70+extern FmXmlFileTag menuTag_All;
71+extern FmXmlFileTag menuTag_LegacyDir;
72
73 typedef enum {
74 MERGE_NONE, /* starting value */
75@@ -152,19 +131,19 @@ typedef struct {
76 } MenuRule;
77
78 /* requested language(s) */
79-char **languages;
80+extern char **languages;
81
82 /* list of menu files to monitor */
83-GSList *MenuFiles;
84+extern GSList *MenuFiles;
85
86 /* list of menu dirs to monitor */
87-GSList *MenuDirs;
88+extern GSList *MenuDirs;
89
90 /* list of available app dirs */
91-GSList *AppDirs;
92+extern GSList *AppDirs;
93
94 /* list of available dir dirs */
95-GSList *DirDirs;
96+extern GSList *DirDirs;
97
98 /* parse and merge menu files */
99 MenuMenu *get_merged_menu(const char *file, FmXmlFile **xmlfile, GError **error);
100@@ -177,7 +156,7 @@ gboolean save_menu_cache(MenuMenu *layout, const char *menuname, const char *fil
101 void _free_layout_items(GList *data);
102
103 /* verbosity level */
104-gint verbose;
105+extern gint verbose;
106
107 #define DBG if (verbose) g_debug
108 #define VDBG if (verbose > 1) g_debug
109--
1102.17.1
111