summaryrefslogtreecommitdiff
path: root/user/mate-sensors-applet/locale-guards.patch
diff options
context:
space:
mode:
authorCyberLeo <cyberleo@cyberleo.net>2020-03-28 05:45:52 -0500
committerCyberLeo <cyberleo@cyberleo.net>2020-03-28 05:45:52 -0500
commit9297468fa579836e3a6a381b798feb6b78217c2d (patch)
tree53168212f427afbcf0693b534530a4af803152e9 /user/mate-sensors-applet/locale-guards.patch
parenta63cc05c53a6f4c22422dc8c69808b14d87a6f6e (diff)
parentda5a69b65a8791fffa6e93366ee585f87eff136d (diff)
downloadpackages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.gz
packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.bz2
packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.xz
packages-9297468fa579836e3a6a381b798feb6b78217c2d.zip
Merge branch 'master' into zfs
Diffstat (limited to 'user/mate-sensors-applet/locale-guards.patch')
-rw-r--r--user/mate-sensors-applet/locale-guards.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/user/mate-sensors-applet/locale-guards.patch b/user/mate-sensors-applet/locale-guards.patch
new file mode 100644
index 000000000..d3a35b92b
--- /dev/null
+++ b/user/mate-sensors-applet/locale-guards.patch
@@ -0,0 +1,29 @@
+diff -Nurd mate-sensors-applet-1.24.0/plugins/i2c-proc/i2c-proc-plugin.c mate-sensors-applet-1.24.0.new/plugins/i2c-proc/i2c-proc-plugin.c
+--- mate-sensors-applet-1.24.0/plugins/i2c-proc/i2c-proc-plugin.c 2020-02-10 07:40:35.000000000 -0500
++++ mate-sensors-applet-1.24.0.new/plugins/i2c-proc/i2c-proc-plugin.c 2020-02-15 12:50:42.395405752 -0500
+@@ -144,9 +144,11 @@
+ gchar *old_locale = NULL;
+
+ /* always use C locale */
++#ifdef HAVE_LOCALE_H
+ if (NULL == (old_locale = setlocale(LC_NUMERIC, "C"))) {
+ g_warning("Could not change locale to C locale for reading i2c-proc device files.. will try regardless");
+ }
++#endif
+
+ if (NULL == (fp = fopen(path, "r"))) {
+ g_set_error(error, SENSORS_APPLET_PLUGIN_ERROR, I2C_PROC_DEVICE_FILE_OPEN_ERROR, "Error opening sensor device file %s", path);
+@@ -203,11 +205,11 @@
+ } /* end switch */
+ fclose(fp);
+ }
+-
++#ifdef HAVE_LOCALE_H
+ if (NULL != old_locale) {
+ setlocale(LC_NUMERIC, old_locale);
+ }
+-
++#endif
+ return (gdouble)sensor_value;
+ }
+