diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-11-05 20:07:38 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-11-06 08:49:52 -0800 |
commit | cb6c08579e3a717ab58498a312d705e634b53e2b (patch) | |
tree | d11cc651d78bfde71470b680bcfc7383b809b8df /meta-xfce/recipes-panel-plugins | |
parent | d8688486c82106bb728e9811d5bdf98d46c9ab5c (diff) | |
download | meta-openembedded-cb6c08579e3a717ab58498a312d705e634b53e2b.tar.gz |
xfce4-systemload-plugin: Fix build on 32bit machines
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-xfce/recipes-panel-plugins')
-rw-r--r-- | meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin/convert-gulong.patch | 39 | ||||
-rw-r--r-- | meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin/convert-gulong.patch b/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin/convert-gulong.patch new file mode 100644 index 000000000..30897caab --- /dev/null +++ b/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin/convert-gulong.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | Fix build on 32bit architectures | ||
2 | |||
3 | It fails with errors like | ||
4 | | ../../xfce4-systemload-plugin-1.3.2/panel-plugin/network.cc:126:13: error: no matching function for call to 'read_netload_libgtop' | ||
5 | | 126 | if (read_netload_libgtop (&bytes[1]) != 0) | ||
6 | | | ^~~~~~~~~~~~~~~~~~~~ | ||
7 | | ../../xfce4-systemload-plugin-1.3.2/panel-plugin/network.cc:42:1: note: candidate function not viable: no known conversion from 'guint64 *' (aka 'unsigned long long *') to 'gulong *' (aka 'unsigne | ||
8 | d long *') for 1st argument | ||
9 | | 42 | read_netload_libgtop (gulong *bytes) | ||
10 | | | ^ ~~~~~~~~~~~~~ | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | |||
15 | --- a/panel-plugin/network.cc | ||
16 | +++ b/panel-plugin/network.cc | ||
17 | @@ -114,6 +114,7 @@ read_netload_proc (gulong *bytes) | ||
18 | gint | ||
19 | read_netload (gulong *net, gulong *NTotal) | ||
20 | { | ||
21 | + gulong tbytes[2]; | ||
22 | static guint64 bytes[2]; | ||
23 | static gint64 time[2]; | ||
24 | |||
25 | @@ -122,10 +123,12 @@ read_netload (gulong *net, gulong *NTota | ||
26 | |||
27 | time[1] = g_get_monotonic_time (); | ||
28 | |||
29 | - if (read_netload_proc (&bytes[1]) != 0) | ||
30 | - if (read_netload_libgtop (&bytes[1]) != 0) | ||
31 | + if (read_netload_proc (&tbytes[1]) != 0) | ||
32 | + if (read_netload_libgtop (&tbytes[1]) != 0) | ||
33 | return -1; | ||
34 | |||
35 | + bytes[0] = tbytes[0]; | ||
36 | + bytes[1] = tbytes[1]; | ||
37 | if (time[0] != 0 && G_LIKELY (time[1] > time[0]) && G_LIKELY (bytes[1] >= bytes[0])) | ||
38 | { | ||
39 | guint64 diff_bits = 8 * (bytes[1] - bytes[0]); | ||
diff --git a/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb b/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb index 46fd47c12..e7a3e9936 100644 --- a/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb +++ b/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb | |||
@@ -9,4 +9,5 @@ PACKAGECONFIG ?= "network power" | |||
9 | PACKAGECONFIG[power] = ",,upower" | 9 | PACKAGECONFIG[power] = ",,upower" |
10 | PACKAGECONFIG[network] = ",,libgtop" | 10 | PACKAGECONFIG[network] = ",,libgtop" |
11 | 11 | ||
12 | SRC_URI += "file://convert-gulong.patch" | ||
12 | SRC_URI[sha256sum] = "bb303fc3020e053ad1fa0b8fcbf0d7681c5563bb8f649357d6a95a577802b072" | 13 | SRC_URI[sha256sum] = "bb303fc3020e053ad1fa0b8fcbf0d7681c5563bb8f649357d6a95a577802b072" |