xfce4-cpufreq-plugin: Fix build with -fno-common

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2020-08-12 14:44:48 -07:00
parent 0a0d6bc8e5
commit 5a35fe8124
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,33 @@
Fix build with -fno-common
Part of Patch from https://src.fedoraproject.org/rpms/xfce4-cpufreq-plugin/raw/master/f/xfce4-cpufreq-plugin-1.2.1-gcc10-common.patch
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/panel-plugin/xfce4-cpufreq-plugin.c
+++ b/panel-plugin/xfce4-cpufreq-plugin.c
@@ -37,7 +37,8 @@
#include "xfce4-cpufreq-linux.h"
#endif /* __linux__ */
-
+CpuFreqPlugin *cpuFreq;
+GtkCssProvider *currentProvider;
void
cpufreq_label_set_font (void)
--- a/panel-plugin/xfce4-cpufreq-plugin.h
+++ b/panel-plugin/xfce4-cpufreq-plugin.h
@@ -93,9 +93,9 @@ typedef struct
gint timeoutHandle;
} CpuFreqPlugin;
-CpuFreqPlugin *cpuFreq;
+extern CpuFreqPlugin *cpuFreq;
-GtkCssProvider *currentProvider;
+extern GtkCssProvider *currentProvider;
G_BEGIN_DECLS

View File

@ -7,4 +7,6 @@ inherit xfce-panel-plugin
SRC_URI[md5sum] = "ccd8f0f7aef51bc4caf1049986d9614f"
SRC_URI[sha256sum] = "c5e044c0dc401d2066f208a3df82a588b3e51ff01425f155d0a1d0f8fce8f5b5"
SRC_URI += "file://0001-Fix-memory-leak-and-reduce-cpu-load-slightly.patch"
SRC_URI += "file://0001-Fix-memory-leak-and-reduce-cpu-load-slightly.patch \
file://xfce4-cpufreq-plugin-1.2.1-gcc10-common.patch \
"